Re: How and Why keyword arguments are useful or harmful?
Amirouche Boubekki 04 Nov 2019 03:31 UTC
Le dim. 3 nov. 2019 à 21:30, Lassi Kortela <xxxxxx@lassi.io> a écrit :
>
> >> 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.
That will be the best (I prefer to avoid lambda/kw and call/kw).
--
Amirouche ~ https://hyper.dev