Re: robust unhygienic macros
Ray Dillinger 23 Aug 2022 02:04 UTC
On 8/21/22 23:16, Marc Nieper-Wißkirchen wrote:
> Am Mo., 22. Aug. 2022 um 00:29 Uhr schrieb Chris Hanson <xxxxxx@chris-hanson.org>:
>> Is there a definition of this term, or better yet, a paper?
> Unfortunately no.
>
> What I mean by a "robust unhygienic macro" is an unhygienic macro that
> even works when the unhygienic macro becomes part of the body of a
> second macro expansion.
>
> Please see "Note 2" under "Explicit-renaming macro" for an example.
You're right! Several people have had the same idea and used the same
term for it. I've been trying to find the paper where John Shutt made a
formal definition and proved properties for it, but that's basically
what it comes down to. From SRFI 211 it looks like you defined the same
semantics. Each argument expression is attached firmly to the the
environment where it appears in non-macro code, even if the macro uses
other macros and it gets expanded a dozen times.
Bear