2 ms·
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: * Debug
by Argorak 15y ago
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.
- danmaz74 15y agoI'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).