[plt-scheme] Best practices when writing macros; avoid name shadowing?

From: Matt Jadud (jadudm at gmail.com)
Date: Sun Feb 3 23:22:05 EST 2008

On Feb 3, 2008 11:09 PM, Chongkai Zhu <czhu at cs.utah.edu> wrote:
> Have you ever heard "hygienic macro" before? If not, google.
>
> Chongkai

Hi Grant,

It is true that there be dragons in the space you're exploring.

You could probably spend a long time on this page alone, before hitting Google:

http://library.readscheme.org/page3.html

I would consider starting with:

R. Kent Dybvig. "Writing Hygenic Macros in Scheme with Syntax-Case".
Computer Science Department, Indiana University. TR-356. June 1992.

And, if you want to start reading about what happens in MzScheme:

Matthew Flatt. "Composable and Compilable Macros: You Want it When?".
International Conference on Functional Programming (ICFP'2002). 2002.

However, I'm not confident any of those references actually answers
your specific question. I mean, you sorta asked "what are the things
one has to be careful of when metaprogramming?" on a Scheme mailing
list. Personally, I'm now going to head for the Metaprogramming
Discussion Bunker (MDB) I dug in the back yard, where I have a
six-month supply of food and water. That might be enough time for
things to have returned to normal around here...

Cheers,
Matt


Posted on the users mailing list.