On Sat, Sep 10, 2022 at 11:07:49AM +0200, Mattias EngdegÄrd wrote: > 9 sep. 2022 kl. 21.27 skrev Sam Steingold : > > > What do you do when sorting a list of lists of numbers? > > Sigh deeply and write ad-hoc code for the nth time. :-) > It would be useful to have a total ordering on Lisp values: for heterogeneous ordered collections, for simplifying multi-key sorting, for normalising unordered collections, etc. > > The devil is in the details: are strings compared with our without properties? Do we observe the wonky IEEE rules for ordering floats? Is there a particularly useful ordering between elements of different types? Do we need to worry about circularity? How do we compare hash tables? And so on. > And language-dependent collation, and Unicode equivalence, and NaNs and... Details, indeed :-) A look at the troubles and tribulations a DBMS goes through gives one a rough idea on how interesting a general solution can become... > Consistency with `equal` would be desirable (up to hash table identity, perhaps). This, too :) Cheers -- t