[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: COMPILER-LET



> (defmacro with-scoped-agent (agent &body body)
>     (labels ((with-scoped-agent-aux (scoped-agents body)
> 		 `(macrolet ((val (thing pname)
> 				  (val-aux thing pname ',scoped-agents))
> 			     (with-scoped-agent (new-agent &body body)
> 				  (with-scoped-agent-aux
> 				      (cons new-agent ',scoped-agents)
> 				      body)))
> 		      ,@body)))
>         (with-scoped-agent-aux (list agent) body))

Um, maybe it's just me, but is this use of LABELS supposed to work?
When I try it here (KCL, Lucid), calls to the local macro die because
the local "-aux" function isn't defined.

> > In point of fact, an EVAL function for CL must keep around an
> > environment object -- else how can it know which variables are lexical
> > and know which operators are really lexical macros?  Why not just put
> > the COMPILER-LETed special variables in the environemnt object--marked
> > as such--then PROGV or PROGW them exactly around EVAL's macro expansion
> > activity.  How could this possibly be a large change to current
> > implementations?

I would like a description in terms of scope and extent.

-- Jeff