| > Consider the closure syntax in JavaScript: Proceeds to list example that isn't valid JavaScript. I have no fundamental objections with CoffeeScript, but I will never use it because there's nothing wrong with JavaScript that CoffeeScript improves upon. For me, personally, it's way easier to visually scan a file that looks like this: var helloWorld = function () { // ...
}Than this: helloWorld -> // ...
It's also easier to grep and sed.I don't mind if you use CoffeeScript, but don't try and force-feed me some BS about concise syntax, make broad generalizations (complex CoffeeScript is harder to debug than JavaScript), or attack someone as a 'whiner' because they said "It's nice, but not my cup of tea." My thought process: 1. In order to debug CoffeeScript, I will need to know JavaScript. 2. If I run into a tricky problem, not only will I need to know JavaScript but I'll also need to know the CoffeeScript compiler's internals. 3. If I run into a really tricky problem, or if I need some sort of optimization, I might have to use JavaScript anyway. 4. JavaScript is actually quite a nice language to program in. 5. All of the libraries I will be using will be written in JavaScript. 6. wu.js ain't nuthin' ta fuck wit. [1] Therefore, I'll keep using JavaScript. YMMV. [1] wu.js is actually quite a killer library: http://fitzgen.github.com/wu.js/ |
You just learn that -> == function() {}
That said, I found it hard to parse until I started working in it for a few weeks and got used to it. Now, reading function() and {} everywhere seems like a mess of boilerplate to me. Really, it is just a matter of what you are used to.
re #3: Also, I can't think of an optimization that JS has that can't be expressed in CS. It just doesn't work like that.
re #5: That seems like a kind of crazy generalization. How can you say that when CS 'compiles' to JS anyway?