[racket] stumped by a little macro exercise

From: Richard Mittel (rich.mittel at gmail.com)
Date: Sat Oct 9 15:41:00 EDT 2010

I tried this, and I'm not sure things played out as you said.  After walking
the Macro Stepper through "(cas-cad-e 2 ((1) 3))," I saw the unbound
identifier error without really seeing two different colorings of mtc.  But
no big deal: I obviously don't understand hygiene as well as I thought I
did, so I'll try to learn more about it on my own.

Incidentally, I was surprised to get the same error when I made mtc a
literal, along with go! and break.  Does hygiene explain this too?

On Sat, Oct 9, 2010 at 2:58 PM, Shriram Krishnamurthi <sk at cs.brown.edu>wrote:

> Unfortunately, each of those mtc's is different.
> Let me suggest you do this instead.  Put the expression you typed at
> the > prompt in the Definitions window, and click on the Macro Stepper
> button.  Step twice.  The coloring is extremely significant (the only
> good use of syntax coloring I've seen in my life) -- it represents the
> hygienic macro expansion algorithm.
> If this coloring doesn't make sense to you, then you might want to
> write a much simpler macro just to explore how hygiene works.
> If this coloring does make sense to you, then you can go back to
> understanding its implication for your macro.
> Shriram
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20101009/c13f1892/attachment-0002.html>

Posted on the users mailing list.