Re: Order of macroexpansion
- From: Peter Hildebrandt <peter.hildebrandt@xxxxxxxxx>
- Date: Thu, 31 Jan 2008 14:53:07 +0100
Rainer,
thanks for the quick response.
Outer is expanded. It returns a new form.
Whatever 'outer' returns will then be evaluated
as usual. Rember, the expansion of outer might
or might not have the 'inner' form.
Okay, so that means, if I create a binding in outer during expansion time (as in my example below), this binding will be available at the expansion of inner, right?
(let (store)
(defmacro outer (val &body body) (setf store val) `(progn ,@body))
(defmacro inner (expr) `(,expr ,store)))
So if I specify that inner is only to be used inside some surrounding "outer", inner can be implemented this way, and I am on the safe side?
.That is, store is first setf'd by outer, then read by inner.
Is this implementation specific, or can I rely on this?
If I have missed the obvious in the hyperspec, I'd be grateful for the pointer.
Thanks,
Peter
- Follow-Ups:
- Re: Order of macroexpansion
- From: Pascal J. Bourguignon
- Re: Order of macroexpansion
- References:
- Order of macroexpansion
- From: Peter Hildebrandt
- Re: Order of macroexpansion
- From: Rainer Joswig
- Order of macroexpansion
- Prev by Date: Re: Tail recursion syntactic sugar faked with TAGBODY-based construct?
- Next by Date: Re: Tail recursion syntactic sugar faked with TAGBODY-based construct?
- Previous by thread: Re: Order of macroexpansion
- Next by thread: Re: Order of macroexpansion
- Index(es):
Relevant Pages
|