emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lexicographic list comparison


From: Mattias Engdegård
Subject: Re: lexicographic list comparison
Date: Sat, 10 Sep 2022 11:07:49 +0200

9 sep. 2022 kl. 21.27 skrev Sam Steingold <sds@gnu.org>:

> What do you do when sorting a list of lists of numbers?

Sigh deeply and write ad-hoc code for the nth time.

> Or maybe sorting lists of lists is just such a rare op that no one has
> ever encountered it before me?

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.

Consistency with `equal` would be desirable (up to hash table identity, 
perhaps).




reply via email to

[Prev in Thread] Current Thread [Next in Thread]