Syntax sugar for partial application

Nick Krempel ndkrempel at google.com
Thu Apr 9 09:38:05 UTC 2015


On 9 April 2015 at 08:46, Jussi Kalliokoski <jussi.kalliokoski at gmail.com>
wrote:

> Yesterday I came up with an idea for syntactic sugar for partial
> application, introducing two new operators: placeholder (`?`) and rest
> placeholder (`???`).
>

 While this looks nice, I'm not sure it's worth new syntax as it can be
adequately implemented in a library, as you point out with lodash.

The library implementation could handle a rest placeholder too.

E.g.

`foo.partial(1, _arg, 2, _rest, 3)`

(or with whatever names you prefer, could be imports from a module).

What's the big advantage of syntactic sugar here?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150409/1338ee28/attachment.html>


More information about the es-discuss mailing list