At 09:13 AM 8/28/98 +0200, Michael Sperber [Mr. Preprocessor] wrote:
>>>>> "Craig" == Craig Lanning
<CraigL(a)internetx.net> writes:
>> Well, the lexical environment of the macro definition only gets
>> applied to the *definition* of the macro. The lexical environment of
>> the *use* gets applied to its expansion. This is contrary to how
>> lexical scoping normally works, the body of a function (corresponding
>> to the body, i.e. expansion of a macro) is executed in the lexical
>> environment of its definition, not of its use.
Craig> That doesn't make any sense. The function aspect of the macro *IS* being
Craig> run within the lexical scope of its definition. The expansion of a macro
Craig> is *NOT* its body it is the return value.
Sorry about the confusion of terms. However, what you're saying is an
accurate analysis of the problem with CL's macro system. *Of course*
things don't make any sense in the context of the CL macro system,
which is precisely why CL macros (or their expansions) cannot
follow the scoping rules of the language.
I think that within the CL environment, the CL macro system makes perfect
sense. If it worked the way that you are advocating, it would be
counterintuitive to the rest of the CL environment.
Craig Lanning
E-Mail: CraigL(a)InternetX.net