Re: [Scheme-reports] ANN: first draft of R7RS small language available Andre van Tonder (29 Apr 2011 19:04 UTC)

Re: [Scheme-reports] ANN: first draft of R7RS small language available Andre van Tonder 29 Apr 2011 19:04 UTC

On Fri, 29 Apr 2011, Andre van Tonder wrote:

> On Fri, 29 Apr 2011, Andre van Tonder wrote:
>
>> On Fri, 29 Apr 2011, John Cowan wrote:
>>
>>>> WG2 will have explicit renaming only.
>>>
>>> If you're curious: explicit renaming was voted up 4-0; syntactic
>>> closures voted down 1-3; and syntax-case tied with 3-3 (with one vote
>>> for sending it to a future WG), which means it failed.  There were 11 WG
>>> members at the time, of which 2 did not vote at all.
>>
>> I hope the committee took into account that for systems like Racket and Chez
>> that are based on a native psyntax-type macro implementation, providing ER
>> macros would adversely affect the complexity class of such macros, because in
>> these systems an extra code walk is necessary to fully unwrap each input to the
>> ER transformer.
>
> Also, they cannot just use the original ER system, becasue it is not compatible
> with modules or with syntax-case.  They would have to adopt a modified version
> of ER such as the one provided in R6RS Larceny.  This adaptation has a couple of
> additional primitives.  They are
>
>     bound-identifier=? (procedure) - to compare bindings that are syntax
>                                      objects, where original ER would use eqv?
>     datum->syntax      (procedure) - for hygiene breaking where original ER
>                                      would have inserted raw symbols into
>                                      the output, incompatible with modules
>                                      and with syntax-case

So you see that once you have accomodated modules and hygiene breaking
correctly as in Larceny, you basically end up with an explicit renaming system
that is SYNTAX-CASE without the pattern matching (the compare procedure
argument to the ER transformer is identical to FREE-IDENTIFIER=?, and you have
to provide BOUND-IDENTIFIER=? and DATUM->SYNTAX anyway as above).

So all that is missing is the pattern-template matcher and you have syntax-case.

And since you already have gone to the trouble of implementing the
pattern-template matcher-inserter in WG1 (for SYNTAX-RULES), the
question becomes why /wouldn't/ you use it in WG2 and get syntax-case?

_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports