[plt-scheme] Some syntax issues

From: David Feuer (dfeuer at techhouse.org)
Date: Fri Aug 16 02:20:11 EDT 2002

On Thu, 15 Aug 2002, Matthew Flatt wrote:

> Generating top-level variables is a tricky business. It still doesn't
> work quite right even in the `module' world, though I think I know how
> to improve things in the next iteration.
>
> > Also, I don't much like the fact that I have to use manually generated
> > unique identifiers. Hygienic macros are supposed to liberate us from the
> > endless gensyms of defmacro.
>
> Agreed...

Petrofsky (of course) figured out a way to do this:  Don't make ellipses-
generated identifiers bound-identifier=?.  So

(define-syntax foo
   (syntax-rules ()
       ((_ a b ...) (let ((temp b) ...) a))))

would work.  I'm not sure if Petrofsky has posted this idea to c.l.s., but
he has implemented it in his "eiod".  Of course some fiddling would be
needed for compatibility in PLT, like using something other than ...

David




Posted on the users mailing list.