From: "Davis Herring" <herring@lanl.gov>
To: "Daniel Colascione" <daniel@censorshipresearch.org>
Cc: Emacs development discussions <emacs-devel@gnu.org>
Subject: Re: Why isn't the string returned by symbol-name read-only?
Date: Sat, 23 Jan 2010 17:12:17 -0800 (PST) [thread overview]
Message-ID: <15016.128.165.0.81.1264295537.squirrel@webmail.lanl.gov> (raw)
In-Reply-To: <4B5B6250.1080108@censorshipresearch.org>
> 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?
It's set for that string not because `car' is too important to be changed,
but because it was created before Emacs was dumped. (Of course, it is
created that early because it is important.) Making such strings
read-only saves the time in checking whether they might need
garbage-collection later. So it's purely an optimization; it's not meant
to protect anything.
Davis
--
This product is sold by volume, not by mass. If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.
next prev parent reply other threads:[~2010-01-24 1:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-23 20:55 Why isn't the string returned by symbol-name read-only? Daniel Colascione
2010-01-23 21:53 ` Chong Yidong
2010-01-24 0:33 ` alin.s
2010-01-24 9:48 ` Thien-Thi Nguyen
2010-01-24 1:12 ` Davis Herring [this message]
2010-01-24 11:19 ` alin.s
2010-01-25 3:08 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=15016.128.165.0.81.1264295537.squirrel@webmail.lanl.gov \
--to=herring@lanl.gov \
--cc=daniel@censorshipresearch.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.