> (1) Suppose 'g' wants to "peek" logger argument, that is, 'g' tries to read the
> value of 'logger:' argument, but want to pass it to inner 'f'.
> The caller imports two procedures, f1 and f2, both takes 'logger:' keyword argument,
> from different library. So it must rename at least one of them.
> (import (rename (f1-library) (logger: f1:logger:))
> (rename (f2-library) (logger: f2:logger:))
> (g f1 f1:logger: foo)
> (g f2 f2:logger: foo)
> How can 'g' peek 'logger:' keyword argument?
This wouldn't work. But it is not surprising, is it? If `f1' and `f2'
both take `logger:' keyword arguments, but both come from different
sources, `f1' and `f2' effectively use different, incompatible
That comes back to the point I raised initially. With hygienic keywords, the library writers cooperate
to share the same keywords if they want compatibility. I don't think it works in reality.
Having test: keywords to specify the predicate would be a natural choice, and we can expect multiple,
independently developed libraries would use it. Do they need to cooperate _beforehand_ to share
the same library that exports 'test:'? What if one library already exports 'test:', and
another library writer want to have the same semantics of 'test:' but doesn't want to depend on the
There's one obvious solution: Create a library that effectively exports all possible keywords,
and users of keyword arguments import them. (It is what (gauche keyword) library in Gauche
does). But then, where's hygiene?
That's why I'm claiming keyword arguments isn't much about identifiers but just an extension
of ordinary arguments. For positional parameters, the semantics of the first parameter differs
completely among procedures, but we don't think it's conflating the protocol. It is ok that the first
argument of procedure f and the first argument of procedure g has completely different meanings,
and it's callers responsibility to pass appropriate one. If g takes a procedure that takes filename
as the first argument, then it's caller's responsibility to pass such procedure to g.
The same applies to keyword argument. If g takes a procedure that takes logger: argument of
a specific type of object, then it's caller's responsibility to pass such procedure.