[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lexicographic list comparison
From: |
tomas |
Subject: |
Re: lexicographic list comparison |
Date: |
Sat, 10 Sep 2022 11:26:39 +0200 |
On Sat, Sep 10, 2022 at 11:07:49AM +0200, Mattias EngdegÄrd wrote:
> 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.
:-)
> 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
signature.asc
Description: PGP signature
- lexicographic list comparison, Sam Steingold, 2022/09/09
- Re: lexicographic list comparison, Mattias EngdegÄrd, 2022/09/10
- Re: lexicographic list comparison, Emanuel Berg, 2022/09/10
- Re: lexicographic list comparison,
tomas <=
- Re: lexicographic list comparison, Sam Steingold, 2022/09/12
- Re: lexicographic list comparison, mattiase, 2022/09/12
- Re: lexicographic list comparison, Stefan Monnier, 2022/09/12
- Re: lexicographic list comparison, Sam Steingold, 2022/09/12
- Re: lexicographic list comparison, Stefan Monnier, 2022/09/12
- Re: lexicographic list comparison, Sam Steingold, 2022/09/12