Absolutely, but harmony was actually influenced by C# and coffeescript. It'll be great when it's widely supported. Definitely a big step in the right direction.
Seriously though, the point free style is nice for these because x => x * 2 doesn't really confer much more meaning than _ * 2, and if you're chaining a bunch of lambda applications together it reduces the size of your code without reducing its readability.
I'm not sure what you mean? Do you mean that in coffeescript the () after a function are optional? I find that it helps with readability with nested functions and callbacks, although it has bitten me before, but for me the readability outweighs the cons.
Also, javascript does have partial application with the bind method, or you can use function scoping to do it yourself:
var foo = function (x, y) {...}
var bar = function (y) {
return foo(5, y);
}
View all comments
Show parent comment
10
u/tmetler Jul 25 '13
In Javascript you pass functions around constantly. Being able to write:
takes so much of the pain out of callbacks.