[r6rs-discuss] R5RS environments
On Sat, 22 Sep 2007, Michael Sperber wrote:
> Abdulaziz Ghuloum <aghuloum at cs.indiana.edu> writes:
>
>> On Sep 20, 2007, at 11:05 AM, Michael Sperber wrote:
>>
>>> Abdulaziz Ghuloum <aghuloum at cs.indiana.edu> writes:
>>>
>>>> Since the R6RS draft changed the way cond, case, let-syntax,
>>>> letrec-syntax, and syntax-rules are parsed/expanded from how
>>>> it was in R6RS, which version of these bindings should be in
>>>> the R5RS environments? If it is the R6RS version of these
>>>> bindings, then the four identifiers =>, ..., else, and _
>>>> should be added to the null-environment.
>>>
>>> Except for _, I believe you're right and fix appropriately.
>>
>> Bizarre. So, in the null-environment, everything behaves like
>> R6RS except for syntax-rules, which behaves like R5RS? And
>> the reason the null-environment's syntax-rules behaves differently
>> is not because it's a different macro, but because it doesn't
>> see "the-underscore". But then again, it won't be exactly like
>> R5RS's anyways because the patters language is different.
>>
>> Forget about my ramblings. Who cares about the null-environment
>> anyways.
>
> Right. But I've added _ nevertheless.
Not that I care much about SCHEME-REPORT_ENVRIONMENT or
NULL-ENVIRONMENT either, but isn't their
purpose to be as backward-compatible as possible, given their location
in (rnrs r5rs)? As far as I am aware, with the originally proposed set
of exports, all of COND, CASE and SYNTAX-RULES would indeed be backward
compatible. With the addition of _, backward compatibility for
SYNTAX-RULES is gratuitously broken. It was not uncommon for R5RS macro
authors to use _ as a literal. All of these would break if _ is included in
NULL-ENVIRONMENT or SCHEME-REPORT-ENVIRONMENT. I would therefore advise
against including _.
It is actually easy to require and trivial to provide the R5RS semantics
of LET[REC}-SYNTAX as well for these environments - isn't this kind of thing
exactly what libraries are really for? - However, since many purportedly R5RS
Schemes already implemented the R6RS variant, it is hard to tell how useful
this would be for backward compatibility. It would be the right thing,
though.
Andre
Received on Sat Sep 22 2007 - 11:26:27 UTC
This archive was generated by hypermail 2.3.0
: Wed Oct 23 2024 - 09:15:01 UTC