[Openmcl-devel] Compiler warnings

Daniel Weinreb dlw at itasoftware.com
Tue Oct 20 12:20:22 PDT 2009



Tobias C. Rittweiler wrote:
>
>
> Uhm, if you agree with Ron's argumentation, but do not want the
> automatic special proclamation, this would mean that
>
>   * (setf x 42)
>   42
>
>   * x
>
> must signal an unbound variable error because it'd try to look up a
> lexical variable X which is not there.
>   
What I am suggesting is an interpretation that says
that if a symbol is seen in "variable" context (i.e.
evaluated, or in a setf/setq, or in a let/arglist), and
it is not declared special, and there is no enclosing
lexical definition, then treat it as if it is a dynamic
variable, but do not side effect the environment
as to what symbols are globally declared special.
Then (setf x 42) returns 42 and x returns 42.
As far as I know, that's what CCL does.  I'm pretty
sure the Lisp machine did that too.

-- Dan
> Of course,
>
>   * (locally (declare (special x)) x)
>   42
>
> would work.
>
>   -T.
>   
>
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20091020/98bc0165/attachment.htm>


More information about the Openmcl-devel mailing list