GNU bug report logs -
#40693
28.0.50; json-encode-alist changes alist
Previous Next
Reported by: Ivan Andrus <darthandrus <at> gmail.com>
Date: Sat, 18 Apr 2020 03:01:02 UTC
Severity: normal
Tags: fixed, patch
Found in version 28.0.50
Fixed in version 28.1
Done: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Bug is archived. No further changes may be made.
Full log
Message #32 received at 40693 <at> debbugs.gnu.org (full text, mbox):
> @defspec quote object
> This special form returns @var{object}, without evaluating it.
> +The returned value is a constant, and should not be modified.
> @end defspec
Not true.
The returned value _can be_ a constant, e.g., if the
code is byte-compiled, and depending on the kind of
object that's returned.
'foo returns the symbol foo. Depending on the
context, you can certainly modify the properties of
that symbol - its `symbol-value', `symbol-function',
and `symbol-plist'.
This kind of wholesale change risks making things
less clear instead of more clear.
See also Eli's message about the purpose of the
manual, and the need to handle this overall message
(about the byte-compiler sometimes causing a return
value to become a constant) in a single place.
The message should be about not _depending_ on a
quoted value returning a new object (e.g. new list
structure). The message should not be that `quote'
never returns a new object.
> +If a subexpression of a backquote construct has
> +no substitutions or splices, it acts like
> +@code{quote} in that it yields a constant that
> +should not be modified.
A constant is not something that _should not_ be
modified. It's something that _cannot_ be modified.
And something that should not be modified is not
a constant. For a constant, there's zero reason
to tell users not to modify it or tell them that
they should not modify it - they _cannot_.
This bug report was last modified 5 years and 57 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.