[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#63103: 30.0.50; nconc compiler optimization breaks user packages
From: |
Mattias Engdegård |
Subject: |
bug#63103: 30.0.50; nconc compiler optimization breaks user packages |
Date: |
Thu, 27 Apr 2023 11:47:13 +0200 |
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!
bug#63103: 30.0.50; nconc compiler optimization breaks user packages, Maks, 2023/04/27