Re: How and Why keyword arguments are useful or harmful?
Lassi Kortela 03 Nov 2019 20:30 UTC
>> call/kw and lambda/kw is a new calling convention. This must not be
>> implemented without a lot of thinking. Now any time the user wants to
>> call a procedure they must think whether it takes or not keywords.
>
> It's not necessary to think about that. An ordinary lambda can be
> replaced with lambda/kw when the time comes to add keyword arguments. If
> you used optional positional arguments or an alist/plist rest argument,
> you would still have to change the lambda-list, so it's not more work.
Sorry, I misread your remark. You're right that at the call site one
needs to remember to add `call/kw` to the front. Ideally (?) it could be
omitted, as it now can in the Schemes that have native keywords. Not
sure how R7RS-large should cope with this. People would have to agree to
add native keyword arguments to the standard; that will not be easy.