[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master 4b79c80c999 1/2: New function 'sort-on'
From: |
Daniel Mendler |
Subject: |
Re: master 4b79c80c999 1/2: New function 'sort-on' |
Date: |
Fri, 02 Feb 2024 17:23:17 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Michael Heerdegen via "Emacs development discussions."
<emacs-devel@gnu.org> writes:
> Daniel Mendler via "Emacs development discussions."
> <emacs-devel@gnu.org> writes:
>
>> Why not seq.el? We already seq-sort in seq.el, so the new function
>> could be added there as well.
>
> Similar opinion as Eli. I don't feel that sorting is a basic sequence
> operation. Unlike concatenation, you don't sort streams (lazy lists)
> for example.
Right. It is not pretty that some operations in seq.el do not generalize
to infinite sequences.
> It's a corner case like `seq-sort' I don't have a strong opinion about.
> I think I would prefer having the function defined somewhere else and,
> maybe, use it in the list implementation of a `seq-sort-on' if we really
> want it.
I would find it better if a similar function is not duplicated in
multiple files, which would be the case if both `sort-on' and
`seq-sort-on' are added.
> But do you really think people often would "sort-on" anything but lists?
Yes. Sorting vectors is a useful operation. If the function is not added
to seq.el it should maybe operate on the list or vector in a destructive
manner for efficiency? In seq.el all operations are non-destructive like
John's `sort-on'.
Daniel
- Re: master 4b79c80c999 1/2: New function 'sort-on', Daniel Mendler, 2024/02/02
- Re: master 4b79c80c999 1/2: New function 'sort-on', Michael Heerdegen, 2024/02/02
- Re: master 4b79c80c999 1/2: New function 'sort-on', Eli Zaretskii, 2024/02/02
- Re: master 4b79c80c999 1/2: New function 'sort-on', Eshel Yaron, 2024/02/02
- Re: master 4b79c80c999 1/2: New function 'sort-on', Eli Zaretskii, 2024/02/02
- Re: master 4b79c80c999 1/2: New function 'sort-on', Michael Heerdegen, 2024/02/02
- Re: master 4b79c80c999 1/2: New function 'sort-on', Emanuel Berg, 2024/02/02
- Re: master 4b79c80c999 1/2: New function 'sort-on', Dmitry Gutov, 2024/02/04
- Re: master 4b79c80c999 1/2: New function 'sort-on', Yuri Khan, 2024/02/05
- Re: master 4b79c80c999 1/2: New function 'sort-on', Eli Zaretskii, 2024/02/05
- Re: master 4b79c80c999 1/2: New function 'sort-on', Dmitry Gutov, 2024/02/05