2

I was reading a discussion about CoffeeScript today and I saw someone make a claim to the effect of "avoid CoffeeScript, since you will eventually need to work with libraries/features/etc that only work in JS." Is this the case? I've started learning CoffeeScript recently and as far as I can tell there is a 1-1 match between the two languages, but I'm not very familiar with JS so I'm not sure.

I've seen this and I'm not asking for a general discussion of the merits of JS vs CoffeeScript. Also, I don't want to count embedded snippets of JS in CoffeeScript as "getting the job done in CoffeeScript," since that makes the question boring.

Community
  • 1
  • 1
Patrick Collins
  • 10,306
  • 5
  • 30
  • 69
  • Possibly relevant: [Iterate over ES6 Set/Map in Coffeescript (with `of` operator)](http://stackoverflow.com/q/26719794/1048572) :-) – Bergi Jan 21 '15 at 18:45

1 Answers1

3

Nope. You can embed JS in CoffeeScript if you really need to, but as CoffeeScript compiles to (semi-idiomatic) JS, anything a JS library can do, CoffeeScript can do.

Andrea
  • 19,134
  • 4
  • 43
  • 65
  • For the sake of making the question non-trivial, let's exclude embedded snippets of JS. Does it still hold? I would think yes, but since CoffeeScript does compile to a subset of JS, maybe something strange has been missed. – Patrick Collins Jan 21 '15 at 18:04
  • 1
    I've never come across something that JS can do but not CoffeeScript, you should be fine. – Kailan Blanks Jan 21 '15 at 18:05
  • All the new stuff in ES6 is either library features (usable from CoffeeScript) or stuff with plain ES5 equivalents, so you're fine. – Andrea Jan 21 '15 at 19:03