[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master 4b79c80c999 1/2: New function 'sort-on'
From: |
Eli Zaretskii |
Subject: |
Re: master 4b79c80c999 1/2: New function 'sort-on' |
Date: |
Fri, 02 Feb 2024 17:47:51 +0200 |
> From: Daniel Mendler <mail@daniel-mendler.de>
> Cc: emacs-devel@gnu.org
> Date: Fri, 02 Feb 2024 16:26:58 +0100
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> >> Would this function fit into the seq library, named seq-sort-on?
> >
> > "Fit" in what sense?
>
> The function works with other sequence types too and it seems a good
> idea to collect sequence-related functionality in seq.el.
OK, but the result is always a list, something seq.el doesn't do.
> > This function can only sort lists, so at least from that aspect its
> > place is not in seq.el. In addition, I see no reason to have it
> > preloaded.
>
> No, in the current form, the function works on vectors too. It always
> returns a list though. But maybe it makes sense to generalize it such
> that it returns the same type as the argument.
I see no reason to preload this function, anyway.
> > I've put it in sort.el because the function 'sort' is there.
>
> No, sort is defined in src/fns.c.
And your point is...?