[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: constant folding/smashing



    Date: 8 Jun 1988 13:42-EDT
    From: NGALL@G.BBN.COM

    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
the semantics.