4 ms·
I'm confused. There was no mention of CoffeeScript in the article. How does using CoffeeScript make it even easier?
by spjwebster 15y ago
I'm confused. There was no mention of CoffeeScript in the article. How does using CoffeeScript make it even easier?
- chrisledet 15y agoI was responding to jinushaun's comment on how Node.js is easy to develop on. CoffeeScript compiles to JavaScript. Give http://jashkenas.github.com/coffee-script/ http://jashkenas.github.com/coffee-script/ a good read and you'll convert too!
- spjwebster 15y agoMy comment was prompted by the trend for at least one HNer to promote CoffeeScript in comments on an article related (however tangentially) to JavaScript.
- cygwin98 15y agoI don't see anything wrong with it. CoffeeScript to JavaScript is like C to Assembly, much more superior. You can strive to excel at Assembly does not mean you have to. Programmers should dedicate their time to solve real-world problems instead of fighting against their tools.
- spjwebster 15y agoAt the risk of hijacking the comment thread for an article about NodeJS to grandstand about CoffeeScript: I'm not a big fan of leaky abstractions, and right now that's what CoffeeScript is. It will be somewhat less leaky once this has been resolved: https://bugzilla.mozilla.org/show_bug.cgi?id=618650 https://bugzilla.mozilla.org/show_bug.cgi?id=618650 …for all browsers. I'm happy for CoffeeScript to exist, to be able to play with it, and to see its syntax inform the work on JS.next. It has a way to go before I'd be happy to use it in a production environment.
- wisty 15y agoCoffeeScript creates very readable JS code. I haven't seen it do much funky stuff. It mostly just adds ";" after statements, and gets rid of the "variables are local unless you * explicitly* declare them local" thing, and so on.
- ehsanu1 15y agoWhile this is an issue, it's a pretty minor one from my own (limited) experience using CoffeeScript. It's extremely easy to relate the JS errors to your CS code, since the JS generated is so readable. It's just a little tedious to have to take a look at the generated JS, but not that bad really. Try it out for some node.js stuff and see for yourself. Also, the issue is being fixed for Chrome/Firefox, which is good enough for dev work.
- grannyg00se 15y agoFrom github: CoffeeScript: number = -42 if opposite Javascript: if (opposite) number = -42; How is coffeescript an advantage in this example? The javascript seems more readable to me as it more closely follows regular english grammar. CoffeeScript: square = (x) -> x * x Javascript: square = function(x) { return x * x; } In this example, again the javascript seems more clear. The function actually has the word function in the declaration. I like that. Essentially coffeescript took out the word 'function' and 'return' and replaced curly braces with other symbols.
- donpark 15y agoCoffeeScript is one of those things that one has to actually try to feel the full impact. Use it for a few days then return to javascript.
- stephth 15y agoInline conditionals on the left and the function keyword? From all the features that CoffeeScript offers it's kinda odd to focus on those minor details of taste and habit.
- grannyg00se 15y agoBut it's one of the first things that is presented on the overview so naturally it's going to get lots of focus.
- stdbrouw 15y agoIt's a bloody overview mate, it mentions everything in more-or-less random order :-)
- endtime 15y agoYou can write it either way in CS. Anyway, saying that CS is a huge improvement over JS doesn't imply that every single feature of CS is better than its JS counterpart.
- TrevorBurnham 15y agoThe LinkedIn engineering blog did have a post praising CoffeeScript a little while back: http://engineering.linkedin.com/21/coffeescript-javascript-that%E2%80%99s-easy-eyes-0 http://engineering.linkedin.com/21/coffeescript-javascript-t...