Re: Quick vote about portable keyword argument syntax Marc Nieper-Wißkirchen 02 Nov 2019 16:57 UTC

Am Sa., 2. Nov. 2019 um 17:48 Uhr schrieb John Cowan <xxxxxx@ccil.org>:
>
>
>
> On Sat, Nov 2, 2019 at 12:42 PM Marc Nieper-Wißkirchen <xxxxxx@nieper-wisskirchen.de> wrote:
>
>> If possible, lambda/kw should become a synonym of lambda (and the
>> syntax of define should allow keywords as well).
>
>
> I am strongly opposed to that.  Lambda is primitive syntax and deeply hardwired into most Schemes.  We should not ask implementers to change it.  We added caselambda rather than attempting to integrate multiple bodies into lambda.  (Of course the implementation of lambda/kw may expand into lambda on some systems.)

I wrote "if possible" on purpose. The reference implementation of SRFI
177 cannot do anything about the "lambda" and the "define" as exported
by "(scheme base)".

For Scheme system, implementing SRFI 177 natively, it is trivial to
amend "lambda" and "define" as exported by "(scheme base)". This has
nothing to do what the primitive version of lambda is as the version
exported by "(scheme base)" can be a macro expanding into the
primitive version.

"case-lambda" looks differently to me as the case-lambda syntax is not
a conservative extension of the usual lambda syntax.

> The same should apply for other extensions.   In particular, I think that as a matter of policy we should have keywords *or* optional arguments in any one procedure definition, not both.

By "optional" arguments you mean rest arguments?