From: Neil Goldman

Subject: Re: Bug in macrolet?

Date: 1999-7-6 12:47

>>The remaining question is how does Allegro manage to get the behaviour >>it does, since it is (I'd say) rather unexpected?
It doesn't seem all that hard to come up with this behavior. The ANS seems to say that the body of a lexical macro (macrolet) definitely has access to PART of the lexical environment in which it is defined (declarations and other lexical macros) but NEED NOT have access to lexical variables (which of course would make no sense). If the interpreter simply makes the ENTIRE lexical environment available, you would get the behavior being described. What is surprising about the ANS is that it does not require an error to be signalled when a lexical variable is referenced. I suspect (but with no explicit evidence) that they simply intended to allow (but not require) an implementation to let a reference to a variable X to be interpreted as a reference to a global definition of X (e.g., a defconstant) in this context, even if a lexical binding of X intervened, not that they intended to allow an implementation to actually make a lexical binding of X visible in interpreted code. But that is pure speculation on my part.
>>And why?
that is certainly a good question -- I don't think anyone would WANT the behavior you have uncovered, even if the ANS allows it. Neil Goldman phone: (310)822-1511 x247 email: <isi.edu at goldman> fax: (310)822-6714 U.S.Mail: USC/Information Sciences Institute, Suite 1000 4676 Admiralty Way Marina del Rey, CA 90292-6695