Re: In favor of explicit argument Marc Nieper-Wißkirchen 11 Aug 2020 07:17 UTC

Am Di., 11. Aug. 2020 um 03:29 Uhr schrieb Alex Shinn <xxxxxx@gmail.com>:

> Another argument in favor of _ is it's already defined in the core language,
> so it won't conflict with future libraries.  If another library provides <> and
> you want to use it with SRFI 197, you have to rename one of them.

The idea is that at least all SRFI libraries provided by a single
implementation use the same binding for each auxiliary syntax like
"<>".

Using "_" makes it simpler, of course, because there's already a
well-known binding of "_" in the base library.

In any case, this is a general issue we may want to solve in the
course of R7RS-large. For example, SRFI 204 has to export zillions of
auxiliary syntax.

A possible solution would be a new syntax binding form

(define-auxiliary-syntax <id> <name>),

where <name> is an identifier. This form would bind <id> to a keyword
(or, better, to a syntax parameter if SRFI 139 is supported) that can
act as auxiliary syntax and whose identity is given by the symbol
<name>. (In other words, these keywords are interned as much as this
is already being done for symbols.)

So two different libraries could define compatible auxiliary syntaxes
through (define-auxiliary-syntax ..1 ..1).

Marc