[Openmcl-devel] process-run-function and "dynamic vs lexical"
Jon S. Anthony
j-anthony at comcast.net
Thu Oct 22 13:21:49 EDT 2009
> Looking at CLHS the only thing I could see so far is that (DEFVAR name
> establish name as a dynamic variable.
That alone makes it pervasive.
> I could not find anything about
> pervasiveness of DEFVAR.
> Also, as explained in my previous post, the let block create new
> lexical bindings
> and since the y name was not declared special I do not see why the
> has to complicate things.
defvar declares its argument to be special(dynamic)! From the spec:
"defparameter and defvar establish name as a dynamic variable."
"establish v.t. to build or bring into being a binding, a
> Please look again, and pay attention to the name substitutions and try
> to tell me
> why my reasoning is wrong.
See above. And, as Greg points out, threads have their own initial set
of bindings for dynamic variables which default to the values from the
global environment. As I said, see the :initial-bindings parameter of
process-run-function to do differently.
More information about the Openmcl-devel