Email list hosting service & mailing list manager

SRFI 177, Portable keyword arguments: 270 days Arthur A. Gleckler (12 Jul 2020 18:34 UTC)
Finalizing SRFI 177 Lassi Kortela (15 Jul 2020 18:18 UTC)
Re: Finalizing SRFI 177 Lassi Kortela (15 Jul 2020 18:42 UTC)
Re: Finalizing SRFI 177 Lassi Kortela (15 Jul 2020 19:02 UTC)

Re: Finalizing SRFI 177 Lassi Kortela 15 Jul 2020 18:42 UTC

So the latest idea was that:

- lambda/kw always returns a genuine lambda that works with `apply`
(when only required positional arguments are given, no keyword arguments).

- call/kw can call either procedures defined with lambda/kw, or
procedures native to the Scheme implementation, with zero or more
required positional arguments and zero or more keyword arguments.

- (define/kw (foo ...) ...) defines `foo` such that the bare identifier
`foo` gives a genuine lambda as above, and the list form `(foo ...)` may
be special-cased to expand to a macro that calls the keyword procedure
so that typing `call/kw` in front is not required. In implementations
where native procedure can have keyword arguments, define/kw can simply
expand to a lambda and then calling (foo ...) will work right.

Scheme implementations that have neither native keyword arguments nor a
`syntax-case` supporting identifier syntax, will not be able to
implement `define/kw` as above. Off the top of my head, Chibi and
Larceny are the only notable Schemes that have neither.