liorean at gmail.com
Sat Oct 17 03:41:32 UTC 2015
On 17 Oct 2015 04:48, "Yongxu Ren" <renyongxu at gmail.com> wrote:
> How about we use a different approach?
> Instead of allowing ```a(b)(c)``` for ```let a = (b,c) => b+c;```,
> Maybe we can use ```a(b,c)``` for ```let a = b => c => b + c```?
Would that do any of the useful stuff you could reasonably want either
currying or partial application for, though? I mean the main use is that it
allows us to do
And I don't really see how your desugaring a single multiple argument
application into several single parameter curried functions allows that
It's the multiple applications to fill single parameter list thing that is
the most useful part of it, mostly as it allows caching the closure at any
step for reuse, not single application to fill multiple sequential single
parameter lists. Also, consider rest parameters, defaults etc. and whether
doing what you want for the simple example case would have weird or
possibly ambiguous meaning. Also, what happens to this value if the
functions are old style and not new style?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss