|
From: | Chong Yidong |
Subject: | Re: Why isn't the string returned by symbol-name read-only? |
Date: | Sat, 23 Jan 2010 16:53:57 -0500 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) |
Daniel Colascione <address@hidden> writes: > Consider > > (let ((name (symbol-name 'foo))) > (aset name 0 ?x) > (cons name (symbol-name 'foo))) > > That yields ("xoo" . " xoo") > > Now try > > > (let ((name (symbol-name 'car))) > (aset name 0 ?x) > (cons name (symbol-name 'car))) > > That returns in an error when you try to evaluate it. The object > returned by (symbol-name 'car) must have some read-only bit set. > > Why isn't that bit set for *all* symbol names? Users will always have enough rope to hang themselves. I don't think we need to lose sleep over this, unless this is demonstrated to be a problem in the real world.
[Prev in Thread] | Current Thread | [Next in Thread] |