[Openmcl-devel] Compiler warnings
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)
> * 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.
> Of course,
> * (locally (declare (special x)) x)
> would work.
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Openmcl-devel