>>>> "Andy" == Andy Piper
<andy(a)xemacs.org> writes:
Andy> It seems if you let bind a constant string, e.g:
Andy> (let ((mystr "\n")) ...)
Andy> and then attach an extent to it, if you run this code the extents will
Andy> *accumulate* rather than replace each other. Semantically when I let bind a
Andy> constant string I would expect it to be extent free...
C89 improved on K&R C by segfaulting if you tried to modify a literal
string constant. In the same spirit, we should make literal lisp
strings lisp-readonly, so that attempts to modify the literal string
generates a lisp error.
If you are going to use a modified string temporarily, do
(let ((mystr (copy-sequence "\n")))
Martin
Many academic folks and language implementors like making it difficult
for the user to modify any objects after initialization.