3 ms·
CoffeeScript's golden rule is "It's just JavaScript". You need to learn JavaScript (or, more importantly, understand JavaScript) before moving on to CoffeeScrip
by geraldalewis 16y ago
CoffeeScript's golden rule is "It's just JavaScript". You need to learn JavaScript (or, more importantly, understand JavaScript) before moving on to CoffeeScript.
JavaScript is a weird language, especially if you're coming from a backend language (even dynamic ones like Ruby). Without understanding why things happen in JavaScript (such as: a block doesn't create scope; functions/lambdas do), you won't understand why things are happening in CoffeScript, either.
Debugging is CoffeeScript's biggest weakness; you'll often have to dig into the JavaScript it outputs in order to fix bugs, and (for the moment) you won't necessarily know what line of CoffeeScript maps to which line of output JavaScript. ( I believe this is actively being worked on: https://github.com/jashkenas/coffee-script/issues/558 https://github.com/jashkenas/coffee-script/issues/558 ).
Here are some good resources that have helped me:
http://yuiblog.com/crockford/ http://yuiblog.com/crockford/
http://eloquentjavascript.net/contents.html http://eloquentjavascript.net/contents.html
http://ejohn.org/apps/learn/#1 http://ejohn.org/apps/learn/#1
- djhworld 16y agoHey thanks man, that's cleared things up for me!