pub enum ValueOrder {
Canonical,
Tlc,
}Expand description
How names (strings, model values and record field names) are ordered. The order of
every other value is built from it, so this decides set order, printing order and
which element CHOOSE picks.
TLC orders names by their position in its global intern table
(util.UniqueString.compareTo compares intern tokens), not by their characters.
That order depends on the order in which SANY and TLC first met each name: adding
an unused definition U == "alpha" can change CHOOSE e \in {"zeta", "alpha"} : TRUE.
dive’s default is a canonical, text-independent order; TLC’s order is
--choose-order=tlc, included in --compat=tlc.
Variants§
Canonical
dive’s canonical order (the default): names by the lexicographic order of their UTF-8 bytes, which is the order of their Unicode scalar values. Total, stable, and independent of module text and evaluation order.
Tlc
TLC’s order (--choose-order=tlc): names by intern token. Exact when the
Interner is fed names in SANY/TLC’s encounter order.