<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Thanks for the replies… unsatisfactory as they me have been :-)<div class=""><br class=""></div><div class="">Kind regards</div><div class=""><br class=""></div><div class="">V/<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 25 Oct 2019, at 17:43, Fred Hebert <<a href="mailto:mononcqc@ferd.ca" class="">mononcqc@ferd.ca</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><br class=""></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Oct 25, 2019 at 11:35 AM Dmitry Belyaev <<a href="mailto:be.dmitry@gmail.com" class="">be.dmitry@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;" class="">To me alphabetical ordering of lists (as legacy string representation) and binaries (as modern string representation) is natural, so it is expected that "aa" < "b" < "bb".<br class=""><br class=""></div></blockquote><div class="">As a general note, this is only true to the extent that you don't care that "ZOOM" is < than "apple" in this dictionary. It is anything but natural, I would say it's probably more "accidental". Actual string sorting tends to rely on a Unicode collation algorithm (a part of the spec that is still missing in the stdlib), since even string normalization won't be enough to ensure things are done safely with regards to human expectations. At this point only libraries such as <a href="https://github.com/erlang-unicode/ux" class="">ux</a> support it well.<br class=""></div><div class=""><br class=""></div><div class="">Most of the orderings we have right now are often arbitrary and can have surprising sides to them. At this point for most data structures the important thing is not that the ordering is correct, but that at least one exists at all; this allows the creation of a bunch of data structures (usually trees and variants) to work on all data types, mixed or not. All atoms are smaller than all strings, even if atoms have a string component to them, for example.<br class=""></div></div></div>
</div></blockquote></div><br class=""></div></body></html>