Binary, List and Tuple Inequalities (Paradox?)

zxq9 zxq9@REDACTED
Mon Oct 28 10:34:55 CET 2019

On 2019年10月28日 月曜日 08:02:13 Raimo Niskanen wrote:
> 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.

Thanks for the explanation.
Worth bookmarking for future reference.


More information about the erlang-questions mailing list