[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#69709: `sort` interface improvement and universal ordering predicate
From: |
Eshel Yaron |
Subject: |
bug#69709: `sort` interface improvement and universal ordering predicate |
Date: |
Thu, 21 Mar 2024 15:54:31 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Hi,
Mattias Engdegård <mattias.engdegard@gmail.com> writes:
> Now the origin/scratch/sort-key branch contains a draft proposal. Summary:
>
> * Our timsort has now the key function handling from the original code
> (ported to Emacs).
> * New keyword-based calling convention for `sort`. The old one is still there
> and works as before.
> * New `value-less-p` universal ordering predicate.
> * No manual updates yet.
> * NEWS entries are there.
> * `sort-on` is now completely superfluous (slower, less convenient) and
> should be removed.
In case it hasn't already been mentioned, AFAICT this also applies to
`minibuffer--sort-by-key` (which is very similar to `sort-on`).
> * Performance seems fine from initial tests. More comprehensive benchmarking
> will be done.
>
> Some things that I haven't made up my mind about:
>
> * Better name for `value-less-p`:
> value<
> {generic,universal,standard,lisp}{-less-p,<}
>
> * Maybe the :destructive keyword be called :inplace or :in-place instead?
> Shorter, less violent.
>
> * Should the :reverse keyword be called :reversed or even :descending ?
>
> * Internally, `value-less-p` computes a 3-way result; it would be easy
> to expose that to Lisp as `value-compare`, could be useful.
>
> * The design space for `value-less-p` is vast: the current code is an
> attempt at intuitive semantics without too much complexity.
Perhaps the "standard order" of Prolog terms programs could be an
interesting reference:
https://www.swi-prolog.org/pldoc/man?section=standardorder
Best,
Eshel
- bug#69709: `sort` interface improvement and universal ordering predicate, Mattias Engdegård, 2024/03/10
- bug#69709: `sort` interface improvement and universal ordering predicate, Eli Zaretskii, 2024/03/10
- bug#69709: `sort` interface improvement and universal ordering predicate, Mattias Engdegård, 2024/03/10
- bug#69709: `sort` interface improvement and universal ordering predicate,
Eshel Yaron <=
- bug#69709: `sort` interface improvement and universal ordering predicate, Dmitry Gutov, 2024/03/22
- bug#69709: `sort` interface improvement and universal ordering predicate, Mattias Engdegård, 2024/03/23
- bug#69709: `sort` interface improvement and universal ordering predicate, Dmitry Gutov, 2024/03/23
- bug#69709: `sort` interface improvement and universal ordering predicate, Stefan Monnier, 2024/03/23
- bug#69709: `sort` interface improvement and universal ordering predicate, Dmitry Gutov, 2024/03/23
- bug#69709: `sort` interface improvement and universal ordering predicate, Stefan Monnier, 2024/03/23
- bug#69709: `sort` interface improvement and universal ordering predicate, Mattias Engdegård, 2024/03/25
- bug#69709: `sort` interface improvement and universal ordering predicate, Mattias Engdegård, 2024/03/29
- bug#69709: `sort` interface improvement and universal ordering predicate, Daniel Mendler, 2024/03/29
- bug#69709: `sort` interface improvement and universal ordering predicate, Mattias Engdegård, 2024/03/29