Curried functions

Yongxu Ren renyongxu at gmail.com
Fri Oct 16 19:16:13 UTC 2015


Michał, thanks for pointing that out. Yes, optional options as the last
optional parameter does exist, in multiple libraries. But I is there really
existed any library that using arrow function like this? I doubt it.

I think arrow function should only be used for lambda expression, callback
and short in block function. It does cause incompatibility if anyone used
arrow function for API interface, but doing that is anti-pattern.

Curry function are often used in iterations, a slow polyfill will defeat
the purpose.
Considering this case:
```
map (add 1) [1..100000]
```
I think native syntax support for curry will be a good thing, it can be
used for JIT.
However, javascript already too big, so why not just let existing syntax to
do the work?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20151016/730b12a8/attachment.html>


More information about the es-discuss mailing list