Re: MOP/Macroexpansion
- From: Pascal Costanza <pc@xxxxxxxxx>
- Date: Sun, 29 May 2005 16:19:52 +0200
Pascal Costanza wrote:
Note that none of these approaches allow you to close over the lexical environment of the class- and method-generating code. If you delay generating methods to runtime, you don't have a chance in this regard because ANSI Common Lisp doesn't require the lexical environments to be available at runtime. This is different when you directly say (defmethod ...) instead of one the solutions I have proposed above because the macroexpansion of defmethod can call make-method-lambda at macroexpansion time and thus close over the (then-accessible) lexical environment.
Of course, your own macro could call make-method-lambda at macroexpansion-time as well.
(Furthermore, Closer to MOP also fixes the different arguments for make-method-lambda in LispWorks, so in this way you could write code that is portable across CMUCL, SBCL and LispWorks.)
Pascal
-- 2nd European Lisp and Scheme Workshop July 26 - Glasgow, Scotland - co-located with ECOOP 2005 http://lisp-ecoop05.bknr.net/ .
- References:
- MOP/Macroexpansion
- From: Andreas Thiele
- Re: MOP/Macroexpansion
- From: Pascal Costanza
- MOP/Macroexpansion
- Prev by Date: Re: MOP/Macroexpansion
- Next by Date: Re: my first Lisp code...comments welcome
- Previous by thread: Re: MOP/Macroexpansion
- Next by thread: Re: MOP/Macroexpansion
- Index(es):