On Fri, Oct 18, 2019 at 11:25 AM Lassi Kortela <xxxxxx@lassi.io> wrote:

2. Several Schemes have built-in kw args using CL-style kw objects.

Specifically Gauche, Gambit, Bigloo, STKlos, S7, Chicken, Guile.
 
Fast code is also nice and led to a very interesting discussion. But
Scheme is very fast already :) I ran some benchmarks with the naive
plist implementation, and calling keyword procedures with no keywords
(i.e. null rest argument) is practically identical in speed to calling
non-keyword procedures.

What implementations did you measure this on?  Chez is a very different matter from Chibi.
 
Calling with one or two keywords is 2-10x
slower, but you have to do like 100K calls per second for it to matter.

What concerns me is if you have 100 keyword args of which only a few are usually supplied at any given time, but then someone comes along and supplies all or most of them.
 
Since Marc and John care about fast calls, would you accept the current
compromise where the naive plist implementation is retained as the
"least common denominator" compatible option, and if faster keywords are
desired, the Scheme implementation is free to have a special calling
convention?

That's always true, so I have no objections.  A SRFI is a facade that can be implemented in any way, that's why it's a Scheme Request For Implementation.

You pointed out in another email that keyword-call is rather long-winded, and I agree.  How about changing it to something compact like just a colon?  I think this is a clear-cut case where such a short identifier is justified.  You will have to make sure that systems accept it as a normal identifier and not a malformed keyword.


 John Cowan          http://vrici.lojban.org/~cowan        xxxxxx@ccil.org
                I am a member of a civilization. --David Brin