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

Michael Sperber sperber at informatik.uni-tuebingen.de
Fri Jan 26 11:33:03 EST 2007


AndrevanTonder <andre at het.brown.edu> writes:

>  - 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.

I don't know all the implications, but would it be technically
feasible to introduce a form like

(define-literal ...)

where, if two libraries contained such a form, both exported ..., and
both get imported by a third module, you'd get the "same binding" aka
no conflict?

>  - 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.

You'd also avoid the "pseudo-shadowing" you get at top-level through
this (a top-level binding shadows the "no binding binding" used for
matching), which may lead to confusing programs.

-- 
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla



More information about the r6rs-discuss mailing list