unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Mattias Engdegård" <mattiase@acm.org>
To: Daniel Mendler <mail@daniel-mendler.de>
Cc: Philip Kaludercic <philipk@posteo.net>,
	Stefan Monnier <monnier@iro.umontreal.ca>,
	63103@debbugs.gnu.org
Subject: bug#63103: 30.0.50; nconc compiler optimization breaks user packages
Date: Thu, 27 Apr 2023 11:47:13 +0200	[thread overview]
Message-ID: <9DCB2C69-7C1E-48A0-8AE2-BD8B1C0E3A80@acm.org> (raw)
In-Reply-To: <e81dd5eb-8fca-0ba8-0458-5752715b062c@daniel-mendler.de>

27 apr. 2023 kl. 08.37 skrev Daniel Mendler <mail@daniel-mendler.de>:

> This behavior is not documented explicitly. However the docstring states
> that "Only the last argument is not altered, and need not be a list".

Indeed. It's clear that this behaviour was never really intended, but also that it was a natural consequence of most Lisp implementations. For instance, Common Lisp specifies this behaviour but only did so after errata.

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.

> 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.

Thank you very much for finding this bug!






  reply	other threads:[~2023-04-27  9:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-26 22:50 bug#63103: 30.0.50; nconc compiler optimization breaks user packages Maks
2023-04-27  5:34 ` Daniel Mendler
2023-04-27  5:44   ` Philip Kaludercic
2023-04-27  6:37     ` Daniel Mendler
2023-04-27  9:47       ` Mattias Engdegård [this message]
2023-04-27 10:42         ` Daniel Mendler
2023-04-27 12:28           ` Mattias Engdegård
2023-04-27 12:55             ` Daniel Mendler
2023-04-27 13:54           ` Drew Adams
2023-04-27 14:02             ` Daniel Mendler
2023-04-27 13:32 ` Maks

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9DCB2C69-7C1E-48A0-8AE2-BD8B1C0E3A80@acm.org \
    --to=mattiase@acm.org \
    --cc=63103@debbugs.gnu.org \
    --cc=mail@daniel-mendler.de \
    --cc=monnier@iro.umontreal.ca \
    --cc=philipk@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).