I was in the "WHY????" crowd for quite a while until I actually tried writing a somewhat big SC 2.0 app in coffeescript. What I found is the following:
* Debugging is a non-issue. The mental map from coffeescript to javascript is straight-forward. So if you hit a bug in your javascript, you know where it came from, even if the line-number doesn't match. Clean, organized CS code will yield clean, organized JS.
* Its a language for people that know JS already. Basically, its a shorthand notation for many javascript idioms - if you don't know what the idiom is there for, you will be lost.
* The compiler is easy to install and runs great - you can get started pretty quickly.
* The documentation is adequate and even explains special cases proper looping over all properties of an object.
* A lot of JavaScript syntax still "just works", like using Javascript Object Syntax instead of the coffeescript one.
All in all, my experience was quite positive (I also had a few nitpicks, especially when it came to SproutCore idioms like calling functions of functions for bindings etc.).
So, before you start ranting about all those issues, please do yourselves a favor: try it for an afternoon. And then complain about the stuff thats really an issue.
I've been using JS "seriously" for many years, and only decided to try CoffeeScript out in my latest project which is on Rails 3.1 - so using CS was effortless.
The transition was very easy, and the syntax is much more readable - that was enough to sell me.
Going on, I also found myself starting to organize my code better with the use of CS classes. I still appreciate the idea of JS classless objects, but having a convenient syntax had a good influence on my code organization (at least for now).
Does it matter? I find it totally awesome, it was the reason I could finally get into developing with js properly. I've never liked the JS syntax, kept me away from learning it.
Writing CoffeeScript is a far nicer experience than writing JavaScript, but I choose to write JavaScript. There are two reasons:
1. First, a minor point: When I find JavaScript experiments I did in 2001, they still work out-of-the-box and I can immediately start editing them (and fixing my horrible style). I'm always impressed by this. With coffeescript, you need the correct version of the compiler to be saved with your project.
2. More importantly, I think CoffeeScript is a temporary solution. CoffeeScript fixes the problems with JavaScript. But JavaScript is also working to fix the problems with JavaScript. I know it's going to be a good while before JS.next is usable for the masses - but I'm sure that before that time there will be a good CoffeeScript-like transpiler that takes care of the old browsers.
It's actually become one of my favorite languages. JavaScript is a terrific language and coffeescript capitalizes on this. The source code just becomes so clear and concise, and I really like how the language was designed. I still get hung up on lexical scoping, but that is my bad. Does anyone know how to use constructor like attr_accessor? Anyway I love writing coffeescript.
Has reddit quality gotten this bad? The highest rated comments are by people who obviously never really used coffeescript. Saying that debugging is an issue is a completely ignorant stance to take.
Until you actually try a language, you really aren't in any position to make any claims about it.
reply