GNU bug report logs -
#63103
30.0.50; nconc compiler optimization breaks user packages
Previous Next
Reported by: Maks <mvproton <at> gmail.com>
Date: Thu, 27 Apr 2023 04:17:04 UTC
Severity: normal
Merged with 63100,
63101
Found in version 30.0.50
Done: Mattias EngdegÄrd <mattiase <at> acm.org>
Bug is archived. No further changes may be made.
Full log
Message #19 received at 63103 <at> debbugs.gnu.org (full text, mbox):
27 apr. 2023 kl. 08.37 skrev Daniel Mendler <mail <at> 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!
This bug report was last modified 2 years and 86 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.