4 ms·
I love Angular.JS, and I appreciate seeing more stuff about it. One thing I would like to see less of in introductory-type articles is Coffeescript. I do unde
by nl 14y ago
I love Angular.JS, and I appreciate seeing more stuff about it.
One thing I would like to see less of in introductory-type articles is Coffeescript.
I do understand the advantages of Coffeescript, but when one is trying to show off a framework like Angular.JS there is already quite a lot of non-obvious magic (eg: automatic dependency injection, the HTML compiler, etc etc) and introducing another thing that most people won't know well is a mistake IMHO.
If you like Coffeescript, then do a post about it, but mixing the two loses a lot of the audience.
- joelhooks 14y agoI agree, it is interesting, but could definitely be another entire article. I've been having similar discussions around testing in this type of article. Angular has an excellent "testing story", with the end to end tests having a lot of baked in functionality. Unfortunately, most articles don't mention e2e or unit tests... ever. On some levels, I feel like testing should be included, even in beginner articles, but the cognitive load is already high...
- Pherdnut 14y agoI don't really get the point of coffeescript at all tbh. JS is one of the most flexible languages in heavy use right now.
- ebiester 14y agoVery simple: JS (module pattern, encapsulation) is verbose. CoffeeScript is more compact, allowing for more code on one page. I toy with going back to JS (I don't like everything about CS, especially with debugging and test tools in node development) but CS optimizes for the good parts of JS and ignores the parts I don't want to use anyway.
- ceslami 14y agoAs a guy who spends a lot of time writing JS, what are the good parts of JS that CS optimizes for, and what are the parts it ignores that you do not want to use?
- cageface 14y agoIt significantly reduces the symbol noise of JS. Typical JS is a dense forest of nested "function" expressions with a ton of (){} and it takes a lot of effort to fish out the logic. CS strips out a lot of that and makes the intention of the code clearer.
- msutherl 14y agoAs somebody who learned CoffeeScript before JavaScript, I have to say I very much appreciate it when people use CoffeeScript in all manner of examples.
- nl 14y agoAs somebody who learned CoffeeScript before JavaScript I think it is probably fair to say your situation is fairly unusual. How did that happen?