[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: constant folding/smashing
- To: NGALL@G.BBN.COM
- Subject: Re: constant folding/smashing
- From: David A. Moon <Moon@STONY-BROOK.SCRC.Symbolics.COM>
- Date: Wed, 8 Jun 88 17:07 EDT
- Cc: cperdue@SUN.COM, common-lisp@SAIL.STANFORD.EDU
- In-reply-to: <[G.BBN.COM] 8-Jun-88 13:42:34.NGALL>
Date: 8 Jun 1988 13:42-EDT
So why does QUOTE make the components of the list (1 2 3)
unmodifiable but not the components of X?
Try thinking of it this way: Symbols don't -have- components.
There are several -associations- from symbols to other objects,
accessed by such functions as SYMBOL-VALUE and SYMBOL-PACKAGE.
Naturally the mutability of these assocations does not depend
on whether the participants in the associations are also used
as constants in one or more programs. This is the qualitative
difference between a symbol and a cons. Of course this is only
a point of view, but I think it properly reflects what Lisp
programmers expect. People are sometimes misled into thinking
that SYMBOL-PLIST and CDR are both components, because both are
implemented by the HRRZ instruction on the pdp-10, but that's
thinking in terms of the implementation rather than in terms of