4 ms·
This is like saying people should avoid jquery because everything jquery does can be done with javascript. Some of us enjoy the convenience of not dealing with
by smokeyj 14y ago
This is like saying people should avoid jquery because everything jquery does can be done with javascript. Some of us enjoy the convenience of not dealing with hacks.
- MatthewPhillips 14y agoCan you give an example of a javascript hack that you have to deal with?
- jcampbell1 14y agoI don't like having to manually check for globals. Other people's code tends to be loaded with missing 'vars'.
- MatthewPhillips 14y agoCoffeeScript won't fix other people's code for you.
- jcampbell1 14y agoIt does fix that specific issue.
- smokeyj 14y agoDealing with inconsistent API's across browsers.
- MatthewPhillips 14y agoCoffeeScript can't help you there.
- jcampbell1 14y agoIt can and does. Coffeescript will never write: ["dog","cat"].forEach(function(animal){ console.log(animal) }); Which will run just fine on your development browser, but will break for real customers. FYI, I don't use coffeescript, but I am at least aware of some problems with Javascript.
- MatthewPhillips 14y agoCoffeeScript will write that if you tell it to: [1, 2].forEach (i) => alert i
- oinksoft 14y agoArray.prototype.forEach and friends are trivial to shim and shouldn't be broken for anybody.
- emil0r 14y agoBut jQuery can. Which was the argument.
- leeoniya 14y agojquery improves the crappy DOM API and its vendor inconsistencies, not javascript the language. if anything improves javascript in terms of syntax, it's underscore/lodash or coffeescript.