[racket-dev] syntax/syntax proposal

From: Ryan Culpepper (ryan at cs.utah.edu)
Date: Fri Jun 15 17:40:49 EDT 2012

On 06/15/2012 03:25 PM, Vincent St-Amour wrote:
> At Fri, 15 Jun 2012 15:09:15 -0600,
> Ryan Culpepper wrote:
>> The 'stx-*' functions work on values that aren't syntax objects, so
>> renaming them to 'syntax-*' would be misleading.
>
> Given the name, I would have thought they only worked on syntax
> objects.
>
>> Roughly,
>>
>>     stx = syntax | null | (cons syntax stx)
>
> I had no idea that was the case. The name certainly does not suggest
> that. The fact that the metavariable for syntax objects is `stx' also
> does not help.
>
> In which cases would I use an `stx' as opposed to a syntax object?

See the docs for 'syntax-e' and the definition of "syntax pair".

Ryan


>
>> I sometimes wonder if we should make a racket/pre-contracts
>> subcollection and just stuff all of racket/contract/base's dependencies
>> in there, then say everything else is allowed (maybe even expected) to
>> use contracts.
>
> +1
>
> Vincent


Posted on the dev mailing list.