[r6rs-discuss] [Formal] (r6rs base) must also export _ and ... at level 1

From: AndrevanTonder <andre>
Date: Fri Jan 26 10:18:29 2007

On Fri, 26 Jan 2007, Jed Davis wrote:

> On Thu, Jan 25, 2007 at 07:46:26AM -0500, AndrevanTonder wrote:
>>
>> My assumption was that ... and _ are bound in (r6rs base). If they are
>> bound, exporting them is necessary for writing most useful macros. It did
>> not even occur to me originally that an implementor might leave them
>> unbound, thereby preventing users from being able to do various useful
>> things to them.
>
> On the other hand, if libraries that define syntax do opt to bind their
> literals, and if something imports two libraries that both happen to use
> the same piece of punctuation, then at least one of them will have to be
> renamed. This seems less than ideal.

  - In some cases your issue can be avoided by reusing the same binding.
    For example, a (pattern-matcher) library that wishes to use ... as
    punctuation can import the (r6rs base) binding of ... instead of
    binding its own version, in which case one can use syntax-rules and
    (pattern-matcher) together without having to rename one of the ...s.

  - What you consider a vice may sometimes be a virtue. For example, if
    (pattern-matcher) did introduce its own binding for ..., it is true that
    you would have to rename one of the ...s if you wanted to use the matcher
    together with syntax-rules. However, this may in fact be a good thing if
    you are going to nest syntax-rules templates and match expressions,
    providing easy disambiguation without the need for more sophisticated
    tricks.

Andre
Received on Fri Jan 26 2007 - 10:12:25 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:01 UTC