From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#69709: `sort` interface improvement and universal ordering predicate Date: Sat, 23 Mar 2024 16:09:16 -0400 Message-ID: References: <86zfv6uqjn.fsf@gnu.org> <4391448A-C7AF-4D7F-8866-C0313956D52D@gmail.com> <8366111E-97C4-4839-AA1E-A577C81A6035@gmail.com> <4B7ACA81-DEB9-4878-BE0B-88A302AF7081@gmail.com> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17494"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 69709@debbugs.gnu.org, Gerd =?UTF-8?Q?M=C3=B6llmann?= , Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , Eli Zaretskii To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 23 21:10:50 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ro7ha-0004On-7y for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 23 Mar 2024 21:10:50 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ro7h9-0002EN-OD; Sat, 23 Mar 2024 16:10:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ro7h8-0002Di-58 for bug-gnu-emacs@gnu.org; Sat, 23 Mar 2024 16:10:22 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ro7h7-0001ot-Kg for bug-gnu-emacs@gnu.org; Sat, 23 Mar 2024 16:10:21 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ro7hm-0001XU-UE for bug-gnu-emacs@gnu.org; Sat, 23 Mar 2024 16:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Mar 2024 20:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69709 X-GNU-PR-Package: emacs Original-Received: via spool by 69709-submit@debbugs.gnu.org id=B69709.17112246085777 (code B ref 69709); Sat, 23 Mar 2024 20:11:02 +0000 Original-Received: (at 69709) by debbugs.gnu.org; 23 Mar 2024 20:10:08 +0000 Original-Received: from localhost ([127.0.0.1]:51084 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ro7gu-0001V6-61 for submit@debbugs.gnu.org; Sat, 23 Mar 2024 16:10:08 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:9428) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ro7gr-0001UJ-9p for 69709@debbugs.gnu.org; Sat, 23 Mar 2024 16:10:06 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 1137C440FDC; Sat, 23 Mar 2024 16:09:18 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1711224556; bh=JwcIpeKVkxeYaBvpKYF/+WxKRjpF3eEqJHPmRC+LTUs=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=n2KZ2Krn+YX4OF0aRfFbV9YvRGP0Cvbm7U7s1LAoBoKo14rCynJBqJ0C9rGMCzpxO cn5Q01b9eent/1XVhr5HF6PW0SvyAsyTXItIV0XULpCkv1FTE1WVB5rNWAsm/BAyOE XfGtHSemZT3Ussz9FbnA2hbBTIWf5g1ZUzbgASDuSSRMKcb46Tfd2d8HDGbIXnN75w 8uvaxSYyNmDM9HwgmkeuP7ejdvJSAaeSI7EDIYPnrMKbNHbxzBPZqe0eTYdFmBhBWi 9ezvHyWRVOE/DQjtzNzJ1WKA1WEikUEE+3BtgTjXhkRu7AzGU7tSa4gTnUtxAzfbET HJ4mq+lvMOJxQ== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id C0A8C440FC2; Sat, 23 Mar 2024 16:09:16 -0400 (EDT) Original-Received: from pastel (unknown [104.247.238.200]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 8FD1312068E; Sat, 23 Mar 2024 16:09:16 -0400 (EDT) In-Reply-To: (Dmitry Gutov's message of "Sat, 23 Mar 2024 19:39:51 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:282000 Archived-At: > So others will have to go around each such project, ensure the original list > is "owned" and add the :in-place argument, to reach the optimum > performance. That's why, I think, 'sort' is mutating in most languages. I think it's mutating in "most languages" because "most languages" are imperative and because those primitives usually operate on arrays (a "naturally imperative" data structure) rather than on singly-linked lists (a "naturally more immutable" data structure). Stefan