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

Re: constant folding/smashing



> I don't believe the following form is in error
>    (SETF (SYMBOL-VALUE (QUOTE X)) 1)
> even though X is wrapped by (QUOTE ...) and is therefore being
> "written as a constant value in a program." (See above) The reason
> this ISN'T an "intolerable situation" is that in the case of a symbol,
> EQUAL is the same as EQ, so you don't get UNEXPECTED side-effects.
> 
Agreed.

> What WOULD be intolerable would be to follow your rule ("side-effects
> on constants are in error") and say that the above form is in error.
> That would force people to write such things as
>    (SETF (SYMBOL-VALUE (INTERN "X")) 1)
> 
I don't think anyone intends to be proposing this.  I don't.

				-Cris