Subject: Re: bug#69709: `sort` interface improvement and universal ordering predicate

From: Gerd Möllmann <[email-masked]>
Date: Mon, 11 Mar 2024 08:01:03 +0100

Mattias Engdegård <[email-masked]> writes:

> Instead of inventing a new and rather meaningless function name, I
> suggest we re-use `sort` and allow both
>
>   (sort seq lessp)                       ; old-style
>   (sort seq &key key lessp destructive)  ; new-style

FWIW, I wouldn't like overloading the name 'sort', because it feels like
magic happening. A new name would make things explicit - no magic.

Otherwise, I can't say much. The destructiveness of sort/stable-sort has
actually never been a problem for me. It has instead often been just
right, when consing a sequence and sorting it in the end.