top | item 6158108

(no title)

cuttooth | 12 years ago

The presentation is very well put together, but CoffeeScript is a hack built on top of JS in order to use Ruby semantics. You're correct in that it's not really used outside of Rails, and not knowing JS proper (not that I personally recommend using it for much more than jQuery and a couple other libraries, when you absolutely must) poses a problem for when someone runs into the 97% of code that is JS.

discuss

order

justinsteele|12 years ago

"Not really used outside of Rails" - Do you have any source to back that up, or is it simply what you've seen? I first used CoffeeScript in a Python shop, personally.

tlrobinson|12 years ago

Pretty much everything in this comment is wrong (though I do recommend learning JavaScript before CoffeeScript)

CoffeeScript is no more of a "hack" than any compiler. Compilers take one language and turn it into another.

I think you mean Ruby syntax, not semantics. CoffeeScript's semantics are much closer to JavaScript than Ruby in almost every way.

It may have it's roots in the Ruby world, but I'd wager more non-Rubyists use CS at this point than Rubyists. I'm one of them.

davidbanham|12 years ago

I write CS for nodeJS apps every day. The only Ruby I write is for Chef and it usually makes me mad. I've never written a Rails app.

bdcravens|12 years ago

You could possibly argue the semantics thing about Ember.