Total array ordering: Difference between revisions

Jump to navigation Jump to search
No change in size ,  10:52, 24 November 2020
m
no edit summary
(reorder paragraphs to improve flow to next section)
mNo edit summary
Line 5: Line 5:
The name ''total array ordering'' is taken partly from the mathematical concept of a [[wikipedia:total order|total order]], which must order any two elements, with elements ordering equally only if they are identical. This concept is transferred to APL by specifying that arrays should only order equally if they [[match]].
The name ''total array ordering'' is taken partly from the mathematical concept of a [[wikipedia:total order|total order]], which must order any two elements, with elements ordering equally only if they are identical. This concept is transferred to APL by specifying that arrays should only order equally if they [[match]].
== Exceptions from the ordering ==
== Exceptions from the ordering ==
Some dialects do not implement a true ''total'' order because they include arrays without defining an order for them.
Some dialects do not implement a true ''total'' order because they support arrays without defining an order for them.


Dyalog APL excludes [[simple scalar]]s other than nulls, [[number]]s or [[character]]s (namely [[namespace]]s, [[object]]s, and [[object representation]]s), because ordering those was considered "contentious but of little incremental benefit."<ref name=bfh>[[Adám Brudzewsky|Brudzewsky, A.]], [[Jay Foad|J. Foad]], and R. Hui. [https://www.jsoftware.com/papers/TAOaxioms.htm TAO Axioms]. 2018-02-02.</ref> [[Roger Hui]] has argued that these scalars are not truly arrays, and are not in the scope of a total array ordering. However, the [[dfns workspace]] includes an APL model which is truly total, though it differs from the native implementation in ordering characters before numbers instead of the opposite.<ref>[[Dfns workspace]]. [http://dfns.dyalog.com/n_le.htm <source lang=apl inline>le</source>] ― Total array ordering (TAO) comparison.</ref>
Dyalog APL excludes [[simple scalar]]s other than nulls, [[number]]s or [[character]]s (namely [[namespace]]s, [[object]]s, and [[object representation]]s), because ordering those was considered "contentious but of little incremental benefit."<ref name=bfh>[[Adám Brudzewsky|Brudzewsky, A.]], [[Jay Foad|J. Foad]], and R. Hui. [https://www.jsoftware.com/papers/TAOaxioms.htm TAO Axioms]. 2018-02-02.</ref> [[Roger Hui]] has argued that these scalars are not truly arrays, and are not in the scope of a total array ordering. However, the [[dfns workspace]] includes an APL model which is truly total, though it differs from the native implementation in ordering characters before numbers instead of the opposite.<ref>[[Dfns workspace]]. [http://dfns.dyalog.com/n_le.htm <source lang=apl inline>le</source>] ― Total array ordering (TAO) comparison.</ref>

Navigation menu