[racket-dev] generalized `begin-for-syntax'

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Thu Sep 8 19:02:34 EDT 2011

It seems a bit too clever for me. FWIW.


On Thursday, September 8, 2011, Matthew Flatt <mflatt at cs.utah.edu> wrote:
> At Thu, 8 Sep 2011 17:48:46 -0400, Eli Barzilay wrote:
>> Does this mean that `define-for-syntax' becomes as deprecated as
>> `require-for-syntax' etc, right?
> At the moment, `define-for-syntax' seems like a more useful shorthand
> than `require-for-syntax', but maybe not if `for-syntax' works as
> `begin-for-syntax'.
> I changed the use of `define-for-syntax' in the Guide to
> `begin-for-syntax', though.
>> Also, does `provide' work fine in a `begin-for-syntax'?
> Yes.
>> Assuming that it is, it could have been nice to have it called just
>> `for-syntax', since
>>   (for-syntax (require foo))
>> becomes equivalent to
>>   (require (for-syntax foo))
> Overloading `for-syntax' in that way reminds me of the `begin' pun
> (expression sequencing versus definition splicing). But maybe this one
> is ok, because definitions and `require'/`provide' forms are completely
> distinct positions, unlike expressions and definition sequences.
> We'd have to keep `begin-for-syntax' for compatibility. Also, for
> layering reasons, I think it's best to keep `begin-for-syntax' as the
> core form.
> I'm ambivalent overall, so I'll wait for others to chime in.
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/dev/archive/attachments/20110908/7f5fcc71/attachment.html>

Posted on the dev mailing list.