[racket] Macros as a first class objects?

From: Thomas Chust (chust at web.de)
Date: Fri Aug 13 21:57:59 EDT 2010

2010/8/13 Sam Tobin-Hochstadt <samth at ccs.neu.edu>:
> On Fri, Aug 13, 2010 at 11:09 AM, Thomas Chust <chust at web.de> wrote:
>> Which brings me to the related question whether it is actually
>> possible to define syntax-transformer-of in Racket?
>> [...]
> Look up `syntax-local-value', which is basically the function you
> want.  Unfortunately, it doesn't work for primitive transformers such
> as `if', but for everything else it should do the trick.
> [...]


syntax-local-value comes close to what I had in mind, but it only
works in the dynamic context of a running transformer procedure. While
this is probably fine for all practical purposes, I'm somewhat
surprised that it is apparently impossible to simply extract the
syntax binding of an identifier given a module or a namespace.


When C++ is your hammer, every problem looks like your thumb.

Posted on the users mailing list.