[Openmcl-devel] Compiler warnings

james anderson james.anderson at setf.de
Wed Oct 21 09:31:37 PDT 2009


On 2009-10-21, at 18:15 , Ron Garret wrote:

>
> On Oct 21, 2009, at 8:33 AM, Daniel Weinreb wrote:
>
>> [...]
>
>> The following paragraph will make sense (even if you
>> disagree with it) if I am understanding your use of
>> the vocabulary as you mean it; not, if not.
>>
>> Whether a symbol has been declared special is one of the
>> inputs to the decision that the evaluator makes as to
>> whether to treat a symbol (when seen in context of
>> being a varible) as dynamic versus lexical.  Although
>> a top level "(setq x 5)" does not declare the symbol x
>> special, Lisp nevertheless treats it as a special variable.
>
> No, Lisp does *not* treat it as a special variable, at least not as
> defined in the spec.  If it did, the following would return 2:
>
> (setf x 1)
> (defun foo () x)
> (let ((x 2)) (foo))
>
> but it doesn't, it returns 1.

well, it does. sometimes. as a side-effect of using the symbol value  
cell.

? (let ((x 2)) (declare (special x)) (foo))
2

[ it's among the examples in my previous post. ]


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20091021/dab0491f/attachment.htm>


More information about the Openmcl-devel mailing list