Re: Is recieve macro from base implementation of SRFI-1 in fact SRFI-8?
Daphne Preston-Kendal 24 Aug 2021 06:45 UTC
On 23 Aug 2021, at 17:58, Marc Nieper-Wißkirchen <xxxxxx@gmail.com> wrote:
>
> Am Mo., 23. Aug. 2021 um 16:36 Uhr schrieb John Cowan <xxxxxx@ccil.org>:
>> Note also that both `receive` and `let-optionals` are being balloted.
>
> It would be nice to have also a let-optionals case-lambda version, say lambda-optionals (modulo evaluation order called opt-lambda in Chibi, I think):
>
> (lambda-optionals (x y (z a) (w b) . u)
> body)
I have a proposal for and implementation of this (called lambda-optional, with no s) as part of my review of optionals and keywords — two different versions, actually, one for when default value expressions require the values of previous arguments and one for when they don’t.
<https://gitlab.com/dpk/presrfis/-/blob/master/srfi-89/lambda-optional.scm>
R7RS portable, expands to a case-lambda form. A version expanding to let-optionals is left as a trivial exercise for the reader ;-)
And as John says, optionals and keywords are two different issues. For reasons I explain in my review, we can’t have a bridged implementation of a form which creates efficient procedures taking both optional positional *and* keyword arguments. I always intended to make optionals and keywords two different SRFIs.
Daphne