[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 31395511: "Don’t attempt to modify constant strings"
From: |
João Távora |
Subject: |
Re: 31395511: "Don’t attempt to modify constant strings" |
Date: |
Sat, 06 Jun 2020 00:19:02 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Dmitry Gutov <dgutov@yandex.ru> writes:
> FWIW, it's a non-intuitive limitation for me as well.
>
> But you can give bug#40671 a read, so see some context you might be missing.
Thanks, that's a pretty long read. There is indeed a relation, but that
bug (the first parts) is about modifying literal objects and this
particular strangeness seems bigger than that. I totally agree it is
undefined behaviour to change structure of literals (quoted or
self-evaluating objects), also in Common Lisp, because compilers are
probably allowed to reuse parts of the internal structure of such
objects. But that's a far cry from having two different manifestations
of `equal` such objects _be_ the same object, but only for compiled
code. Emacs doesn't behave that way for quoted lists (fortunately), so
I don't think it should behave that way for strings either.
An "easy" solution would be to say: in Elisp, there are no string
literals, period, because properties. But that's likely expensive...
unless some clever copy-on-write semantics operate under the hood. But
I'm talking out of my elbow, I don't really know what's under the hood
here.
João
- Re: 31395511: "Don’t attempt to modify constant strings", (continued)
- RE: 31395511: "Don’t attempt to modify constant strings", Drew Adams, 2020/06/05
- Re: 31395511: "Don’t attempt to modify constant strings", Pip Cet, 2020/06/05
- Re: 31395511: "Don’t attempt to modify constant strings", Paul Eggert, 2020/06/05
- Re: 31395511: "Don’t attempt to modify constant strings", Basil L. Contovounesios, 2020/06/04
- Re: 31395511: "Don’t attempt to modify constant strings", João Távora, 2020/06/05
- Re: 31395511: "Don’t attempt to modify constant strings", Dmitry Gutov, 2020/06/05
- Re: 31395511: "Don’t attempt to modify constant strings",
João Távora <=
- Re: 31395511: "Don’t attempt to modify constant strings", Dmitry Gutov, 2020/06/05
- FW: 31395511: "Don’t attempt to modify constant strings", Drew Adams, 2020/06/05
- RE: 31395511: "Don’t attempt to modify constant strings", Drew Adams, 2020/06/05
- Re: 31395511: "Don’t attempt to modify constant strings", Paul Eggert, 2020/06/05
- Re: 31395511: "Donât attempt to modify constant strings", Richard Stallman, 2020/06/06
- Re: 31395511: "Don’t attempt to modify constant strings", João Távora, 2020/06/06
- Re: 31395511: "Don’t attempt to modify constant strings", João Távora, 2020/06/06
- Re: 31395511: "Don’t attempt to modify constant strings", Pip Cet, 2020/06/04
- Re: 31395511: "Don’t attempt to modify constant strings", João Távora, 2020/06/04