[racket] Understanding lexical context

From: Sam Tobin-Hochstadt (samth at cs.indiana.edu)
Date: Tue Oct 1 15:17:54 EDT 2013

On Tue, Oct 1, 2013 at 3:01 PM, Greg Hendershott
<greghendershott at gmail.com> wrote:
>
> Is there a generically safe/sane way to write such macros?
>
> Could some mechanism be devised to help do this -- much like
> syntax-parameters enables you to write anaphoric-if and friends
> safely/sanely?

The right answer, I think, is to make an explicit choice, and to
document that as part of the API of your macro.  For example, `struct`
uses the name of the structure for the lexical context of all of the
generated identifiers.

Sam

Posted on the users mailing list.