[Openmcl-devel] process-run-function and "dynamic vs lexical"

Jon S. Anthony j-anthony at comcast.net
Thu Oct 22 10:21:49 PDT 2009


> 
> Looking at CLHS the only thing I could see so far is that (DEFVAR name  
> init)
> establish  name as a dynamic variable. 

That alone makes it pervasive.

> I could not find anything about  
> the
> 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  
> DEFVAR
> 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
declaration, ..."


> 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.


/Jon





More information about the Openmcl-devel mailing list