all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Chong Yidong <cyd@stupidchicken.com>
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 16:53:57 -0500	[thread overview]
Message-ID: <87vdespjwq.fsf@stupidchicken.com> (raw)
In-Reply-To: <4B5B6250.1080108@censorshipresearch.org> (Daniel Colascione's message of "Sat, 23 Jan 2010 15:55:44 -0500")

Daniel Colascione <daniel@censorshipresearch.org> 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.




  reply	other threads:[~2010-01-23 21:53 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 [this message]
2010-01-24  0:33 ` alin.s
2010-01-24  9:48   ` Thien-Thi Nguyen
2010-01-24  1:12 ` Davis Herring
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=87vdespjwq.fsf@stupidchicken.com \
    --to=cyd@stupidchicken.com \
    --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.