[racket] Passing information between syntax classes

From: Konrad Hinsen (konrad.hinsen at fastmail.net)
Date: Thu Feb 12 12:33:02 EST 2015

Jens Axel Søgaard writes:

 > Since the expansion of (bar x) depends on the identifiers
 > in the surrounding usage of foo, one solution is to use
 > syntax-parameters that adjust the meaning of (bar x)
 > according to the context in which it appears.

Thanks, that sent me off to an interesting read in the docs.. from
which I conclude that syntax-parameterize is the analogue of
macrolet in the Common Lisp world.

If I understand everything correctly, your version differs from my
original code in that the test is done at macro expansion time, rather
that at evaluation time. That shouldn't be a problem for the
application I have in mind.

Your example does the opposite of Greg's: it factors out the pattern
but not the expansion. I'll try to figure out if I can combine both of
your suggestions to factor out both aspects, but not today...

Thanks again,

Posted on the users mailing list.