[racket-dev] Enhancement to the syntax system?

From: Stefan Israelsson Tampe (stefan.itampe at gmail.com)
Date: Tue Jul 10 11:44:47 EDT 2012

samth made a pointer to

http://srfi.schemers.org/srfi-72/srfi-72.html

It does not look like guile racket etc. have implemented this yet.

Am I wrong?

This is precisely what I'm after!

On Tue, Jul 10, 2012 at 5:26 PM, Ludovic Courtès <ludo at gnu.org> wrote:

> Hi,
>
> Matthew Flatt <mflatt at cs.utah.edu> skribis:
>
> > It's natural --- but not correct --- to think that #` is responsible
> > for hygiene, in which case `(f #'x)' should keep the given `x' separate
> > from the `let'-bound `x' in the result.
>
> [...]
>
> > If you change the example to
> >
> >  #lang racket
> >  (begin-for-syntax
> >   (define-syntax-rule (f body)
> >     #`(let ([x 1]) body)))
> >  (define-syntax (m stx)
> >    (with-syntax ([zz (f x)]) #`(let ([x 2]) zz)))
> >  (m)
> >
> > so that `f' is used as a macro instead of a function, then you get 2,
> > since the macro-expansion of `(f x)' keeps the `x's separate.
>
> Interesting.  Thanks for the clarification and examples.
>
> Ludo’.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/dev/archive/attachments/20120710/07f8612a/attachment.html>

Posted on the dev mailing list.