From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel Mendler Newsgroups: gmane.emacs.bugs Subject: bug#63103: 30.0.50; nconc compiler optimization breaks user packages Date: Thu, 27 Apr 2023 12:42:17 +0200 Message-ID: <679f4102-4e3f-656f-18d9-4a3cc68ce595@daniel-mendler.de> References: <877cty45rx.fsf@gmail.com> <871qk5516v.fsf@posteo.net> <9DCB2C69-7C1E-48A0-8AE2-BD8B1C0E3A80@acm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32432"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Philip Kaludercic , Stefan Monnier , 63103@debbugs.gnu.org To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 27 12:43:22 2023 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 1prz5t-0008Hb-NJ for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 27 Apr 2023 12:43:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1prz5d-0002tn-IY; Thu, 27 Apr 2023 06:43:05 -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 1prz5b-0002sz-DX for bug-gnu-emacs@gnu.org; Thu, 27 Apr 2023 06:43:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1prz5b-0001vg-5B for bug-gnu-emacs@gnu.org; Thu, 27 Apr 2023 06:43:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1prz5a-0001mC-H1 for bug-gnu-emacs@gnu.org; Thu, 27 Apr 2023 06:43:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Mendler Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Apr 2023 10:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63103 X-GNU-PR-Package: emacs Original-Received: via spool by 63103-submit@debbugs.gnu.org id=B63103.16825921496790 (code B ref 63103); Thu, 27 Apr 2023 10:43:02 +0000 Original-Received: (at 63103) by debbugs.gnu.org; 27 Apr 2023 10:42:29 +0000 Original-Received: from localhost ([127.0.0.1]:57654 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prz53-0001lS-1M for submit@debbugs.gnu.org; Thu, 27 Apr 2023 06:42:29 -0400 Original-Received: from server.qxqx.de ([178.63.65.180]:35519 helo=mail.qxqx.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prz50-0001lE-6r for 63103@debbugs.gnu.org; Thu, 27 Apr 2023 06:42:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=qxqx.de; s=mail1392553390; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=fASm2ba/g7QmSjGWfZyABSn1EUVh7fWAOAms6ECAT4Y=; b=ay28GqiFgjN54MBZlzVabDwxKD B0dUa/EOsV9gZPTSUSD7ybI5aEYCRzxl7mH/f6TQd+ActVzecfrLAnDa4TV33BsqADkA6Azf1CDrP dtpZXpEgl9hgIx0qbc1RexMsCRQt9RcZc7AkY+EYXtzd7Q2yr+Tp3cS5HjXE4G4llEGQ=; Content-Language: en-US In-Reply-To: <9DCB2C69-7C1E-48A0-8AE2-BD8B1C0E3A80@acm.org> 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:260714 Archived-At: On 4/27/23 11:47, Mattias EngdegÄrd wrote: > Although the utility of accepting dotted lists is very slight and requiring proper list for all but the last argument would have made it easier for us, this obviously needs to be a well-reasoned change if made at all. I'll remove the troublesome compiler transform right away. Thanks for fixing the issue! I agree that improper lists are of limited utility. It wasn't the best idea to use them for the `completion-all-completions' API since this makes manipulation of the result for API users less convenient from my experience. >> Due to symmetry reasons it is not far-fetched to assume that when >> `nconc' can be used to turn a proper list into an improper list, that >> the inverse works too. > > I don't think that's a valid assumption -- when the documentation says that arguments are lists, then they should be proper lists. The behaviour for improper lists needs to be specified explicitly, in particular in this case when the function actually overwrites arbitrary information in the input, not just a terminating nil. Well, my assumption didn't completely stand on its own. Given that the last argument can be a non-list suggests that the last argument is not inspected or mutated, but just overwrites the cdr of the second to last argument. This then implies that the second to last argument could also be an improper list. Given that CL and Elisp have behaved like this for a long time, it seems better to preserve this property. I think it is kind of nice that `nconc' can be used as a tool to turn a proper list into an improper list and vice versa. It may be good to document this in the `nconc' docstring and the Elisp manual. Daniel