
Is there a boolean kwarg library? Pretty much overriding #%app
to expand (f a #:b c #:d #:e)
to (f a #:b c #:d #t #:e #t)
.

HTTP/2 is such a massive perf improvement over 1.1 that I think it’s definitely needed. Especially since HTTP/3 won’t be more ubiquitous than 2 for at least a decade.

Using 2 makes “request batching” patterns in web APIs basically obsolete

@james has joined the channel

another (simpler?) option is to define a new define/kw-compact
(say) form that does the translation for all new functions defined this way

basically you first define the wrapper as a procedure using apply
and then you define the form to wrap all this in a define form

@laurent.orseau But that still wouldn’t allow clients of the function to call it the way @sorawee shows, or am I missing something? Are you instead thinking about easing the definition of functions with keyword arguments that default to #false
?

you can use syntax-parser
to do pretty much what you want with arguments

so the defined f would be a form rather than a function/procedure, that’s the drawback (you can’t use apply as easily)

Right. In fact I did exactly what @laurent.orseau suggests before. The problem is that f
is now a macro, so it couldn’t be used as a higher order function (like (apply f ...)
or (map f ...)
), though I think there’s actually a way to make it work?

But it also depends on whether we want this to work with functions that we don’t define ourselves (which would require a change to #%app
)

For getting started, I would also recommend some of the languages from @mbutterick’s https://beautifulracket.com

So they’ve read that. They’re looking for something a little bigger than that

There don’t seem to be as many examples between “small” langs and “huge” langs, but the plai typed one looks ideal for this, combined with the article