Binary, List and Tuple Inequalities (Paradox?)
Mon Oct 28 09:02:13 CET 2019
I'd like to defend the current term order of lists, tuples and
Lists are compared a'la string comparison, which avoids having to
traverse the whole list when comparing. Binaries are compared as lists
since both are used for handling strings, and also to be compared like
memcmp does it.
Tuples are used for general complex terms. They can be compared size
first whithout having to be fully traversed, as opposed to lists, which
is useful in other contexts. You can thereby choose your data
structure to select comparision.
More information about the erlang-questions