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 19:01 UTC

> Off the top of my head, Chibi and
> Larceny are the only notable Schemes that have neither.

Since `(define/kw (foo pos1 pos2 pos3 #!key key1 key2 key3) ...)` is
supposed to produce a `foo` callable as such:

(foo pos1 pos2 pos3 :key1 val1 :key2 val2 :key3 val3)

perhaps Chibi and Larceny could use a `define/kw` expansion like this:

(define (foo pos1 pos2 pos3 . keyword-plist)
   (let ((key1 (cdr (plist-assoc 'key1 keyword-plist)))
         (key2 (cdr (plist-assoc 'key1 keyword-plist)))
         (key3 (cdr (plist-assoc 'key1 keyword-plist))))
     ...))

That means the internal calling convention for keyword lambdas is
identical to the user-friendly surface syntax, i.e. a traditional Lisp
property list (plist).