[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#40671: [DOC] modify literal objects
From: |
Paul Eggert |
Subject: |
bug#40671: [DOC] modify literal objects |
Date: |
Tue, 28 Apr 2020 10:59:40 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 |
On 4/28/20 6:54 AM, Dmitry Gutov wrote:
> It shouldn't be changed because it's a value of a string literal. Not because
> it's constant (it isn't).
That depends on the string literal and the particular Emacs implementation. In
Emacs master, some string literals yield strings that are constant because Emacs
has undefined behavior at the C level (maybe coredump, maybe not) if you try to
change them, some string literals are constant because if you try to change them
Emacs will reliably signal an error, some string literals are constant because
if you change them Emacs might behave unpredictably without having undefined
behavior at the C level, and the remaining string literals are constant becase
you shouldn't change them. We have never documented exactly which string
literals are which, and we shouldn't document that now because it is an
implementation detail that users should not rely upon.
It would be a mistake for the documentation to say that the problems we've been
discussing occur only with string literals, as these problems can occur for
strings that were not generated from string literals, and they can also occur
for objects that are not strings. So "string literal" would be the wrong
terminology here.
- bug#40671: [DOC] modify literal objects, (continued)
- bug#40671: [DOC] modify literal objects, Dmitry Gutov, 2020/04/26
- bug#40671: [DOC] modify literal objects, Paul Eggert, 2020/04/26
- bug#40671: [DOC] modify literal objects, Dmitry Gutov, 2020/04/26
- bug#40671: [DOC] modify literal objects, Paul Eggert, 2020/04/26
- bug#40671: [DOC] modify literal objects, Dmitry Gutov, 2020/04/27
- bug#40671: [DOC] modify literal objects, Paul Eggert, 2020/04/28
- bug#40671: [DOC] modify literal objects, Dmitry Gutov, 2020/04/28
- bug#40671: [DOC] modify literal objects,
Paul Eggert <=
- bug#40671: [DOC] modify literal objects, Dmitry Gutov, 2020/04/28
- bug#40671: [DOC] modify literal objects, Paul Eggert, 2020/04/28
- bug#40671: [DOC] modify literal objects, Dmitry Gutov, 2020/04/28
- bug#40671: [DOC] modify literal objects, Paul Eggert, 2020/04/28
- bug#40671: [DOC] modify literal objects, Dmitry Gutov, 2020/04/28
- bug#40671: [DOC] modify literal objects, Paul Eggert, 2020/04/28
- bug#40671: [DOC] modify literal objects, Dmitry Gutov, 2020/04/28
- bug#40671: [DOC] modify literal objects, Paul Eggert, 2020/04/28
- bug#40671: [DOC] modify literal objects, Dmitry Gutov, 2020/04/28
- bug#40671: [DOC] modify literal objects, Dmitry Gutov, 2020/04/28