On Sun, Feb 5, 2017 at 9:41 PM,  <keccak...@gmail.com> wrote:
> I must be missing something simple here.
>
> 229> (define-syntax a (lambda (stx) (syntax-parse stx [(a) #`(begin (define x 
> 97) (define y 98) (define z 99))])))
> 230>(a)
> 231>y
> 232; y:undefined;
> 233; cannot reference undefined identifier
> 234; [,bt for context]
>
> If the macro is given these ids, like (a x y z), then it will work, but can't 
> I also pick standard names like this in advance, or is that somehow 
> fundamentally "unhygienic"?

Yep, it's a matter of hygiene.

> Perhaps I have to generate the names in a place visible to both the 
> definition and use or something...

Not sure exactly what you have in mind. At any rate, you can provide
the identifiers to the macro, like you mentioned, or you can make a
non-hygienic macro.

-J

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to