3 ms·
What bothers me in this with pure JS is the verbosity of "function (arg1,arg2) {return ...;}"
by arnoooooo 15y ago
What bothers me in this with pure JS is the verbosity of "function (arg1,arg2) {return ...;}"
- dmmalam 15y agocoffescript's sugar is pretty nice (haskell inspired)? function (a,b) {return a+b} becomes (a,b) -> a+b Hopefully in harmony we will see a shorter function syntax for environments where CS isn't an option
- udp 15y agoNot having to write `function` everywhere is pretty much the reason I started using CoffeeScript.
- fein 15y agoWhy not just save snippets? I do this in emacs (yasnippet) all the time instead of constantly rewriting the same stub. Not knocking coffescript here, just saying that "I don't want to write a specific word" is a pretty terrible reason to pick any language over another.
- eru 15y agoI guess he also doesn't want to read it everywhere and clutter up his code.
- embwbam 15y agoThe idea is that once you define "apply" and its like, you don't have to write function () { return; } inline any more. You just use library-level functions and partially apply them. These techniques reduce the number of anonymous functions you create.