Email list hosting service & mailing list manager

SRFI-177 vs. chibi's let-keywords Amirouche Boubekki (25 Oct 2019 11:53 UTC)
Re: SRFI-177 vs. chibi's let-keywords Marc Nieper-Wißkirchen (25 Oct 2019 12:00 UTC)
Re: SRFI-177 vs. chibi's let-keywords Lassi Kortela (25 Oct 2019 15:20 UTC)

Re: SRFI-177 vs. chibi's let-keywords Lassi Kortela 25 Oct 2019 15:20 UTC

>> What is the advantage of SRFI-177 compared to chibi's let-keywords.

Thanks for asking!

>> Here is the documentation that I found in the code:
>>
>> ;;> \macro{(let-keywords ls ((var [keyword] default) ... [rest]) body ...)}
>
> Here, the matching definitely happens at runtime except for when you
> have a good optimizing compiler.
>
> The point is that the dispatching happens solely at the callee's site,
> while the call itself is an ordinary procedure call.

Correct. SRFI 177 `keyword-lambda` must expand into `lambda` in Scheme
implementations that have native support for keyword arguments, in order
to be fully backward-compatible. Chibi's `let-keywords` expands into
`let`; it's not clear how we would combine that with native keyword
arguments to allow a fast implementation of `keyword-call` in Gambit,
Gauche, Kawa etc.