I think somehow building a language which compiles to another language feels like a bad idea from the start, instead of learning javascript properly from the start. Look into Douglas Crockfords Good Parts and then are you hooked. And javascript is not hard - writing good code is hard regardless of language! If you write crappy code in javascript, then you propably will write crappy code in coffeescript or lattescript or what the flavor will be of the day. And to say that coffeescript syntax is beautiful passes me. I like my curly braces and C syntax - and would preferably work in a language which is like that (sorry VB!). And more toys and languages and frameworks for doing the same thing all over again feels not like progress to me anymore!

  • 5
    So, Java compiling to bytecode and C#, VB.NET and other .NET languages compiling to IL are also bad ideas?
    – Oded
    Commented Oct 12, 2011 at 18:57
  • 10
    The difference is people usually don't program directly in bytecode and IL (unless I'm mistaken) whereas programming in Javascript is common, hence his surprise/question.
    – wildpeaks
    Commented Oct 12, 2011 at 18:59
  • 14
    this "question" contains three exclamation points and no question marks
    – azheglov
    Commented Oct 12, 2011 at 19:02
  • If you like to code in IL then I'm wrong. I'm only thinking that javascript is sufficient at it is. And when it moves to ECMAScript 5 and the strict mode will be implemented in browsers then it will be even better. But I'm not saying that doing something else is completely wrong. I want a discussion of the pros and cons, of why you would prefer something else than js.
    – marko
    Commented Oct 12, 2011 at 19:05
  • 3
    ___ sucks, am I right?
    – TRiG
    Commented Oct 23, 2012 at 15:10

4 Answers 4


CoffeeScript is mostly a different syntax on top of JavaScript.

If you understand JavaScript and truly understand JavaScript, then your allowed to use CoffeeScript if you say, prefer whitespace and ->

I consider the difference between JS & CS to be the same as arguing about

if (thing)
  // code

if (thing) {
  // code

(the latter is better. Anyone who does the former should get shot).

Anyway, the main issue with coffeescript is having people come into it (mainly from rails) and then write coffeescript without knowing javascript.

Therefore coffeescript has all the same flaws as jQuery. They are just more entry points for bad programmers to write more bad JavaScript. We really need to solve code quality somehow.

  • 8
    offopic: the latter is better. Anyone who does the former should get shot - it depends on the language - i like first style, but its not compatible with JS, which is my main language ;)
    – c69
    Commented Oct 12, 2011 at 19:54
  • 1
    it depends on the language. I think he meant with respect to JavaScript. Commented Jan 21, 2012 at 6:26
  • 1
    There are also things you simply can't do in CoffeeScript. You have considerably less granular control over object creation and the like. Commented Aug 22, 2012 at 0:08
  • Just adding to c69's comment, formatting the first way can lead to actual issues: encosia.com/… Commented Dec 20, 2012 at 4:01
  • 1
    (the latter is better. Anyone who does the former should get shot) - Prove it! Extremism is just bad no matter who, when, where. Commented Oct 5, 2015 at 17:32

There is a misconception of JavaScript as a "toy" language. This causes people to regard it as something to be played with, rather than used for anything substantial. Add that to the low barrier for entry (i.e. you already have a browser and a text editor, so you can start writing JavaScript), and you end up with masses of people who don't understand the language writing mass amounts of code, and sullying the name "JavaScript".

There is a higher (absolute) amount of bad JS than other languages because of that increased visibility. Bad habits become commonplace as the bad code propagates throughout the web and people view source on pages that have not been vetted for accuracy or good practice, and JavaScript ends up with a bad name because of it.

For these reasons, people feel the need to build more familiar (more "real") languages that transpile to JavaScript. They want the comfort of classical OO, static typing, and other features that appear in other languages. They see the monstrosities created by inexperienced programmers using JS, and think it must be a result of the "fundamental flaws" (to quote Google) in the language.


Anyway, use what you want. I'll stick with my object literals, dynamic typing, and prototypal OO, thanks.

  • 2
    Hey but isn't dart going to solve all our problem! (</sarcasm>)
    – Raynos
    Commented Oct 12, 2011 at 19:20
  • Amen to that! (Not the dart comment!)
    – marko
    Commented Oct 12, 2011 at 20:20
  • It's 2018 and JavaScript has succumbed to the pressure of class :-/
    – ankush981
    Commented Mar 3, 2018 at 4:37

I think the benefit (disclaimer: I have not used CoffeeScript beyond playing with the example on the website) is that it makes JavaScript a little more intuitive for the crowd it's catering to: i.e. the Ruby/Python people.

I personally don't see a need for CoffeeScript, as I like the JavaScript syntax. However, I see how it could be useful.

  • 1
    Yeah, I think the ruby/python syntax looks suspicious to me, because I have mostly been coding in C-style languages like Javascript, C#, PHP, actionscript and java.
    – marko
    Commented Oct 12, 2011 at 19:07
  • 4
    It looks fine to me mostly (except the -> and => syntax) since I've used Ruby/Python a little, but I think we shouldn't try to hide away JavaScript due to how ubiquitous it is. Yes, some of it is clunky but learning "pure" JavaScript is IMO a better return on investment due to the proliferation of "pure" JavaScript in the wild. Commented Oct 12, 2011 at 19:12

Whether you like the syntax or not is subjective, however the fact is that CofeeScript takes care of some annoying JavaScript warts. Of course, it still remains unclear if it is worth introducing a new language and coping with the compilation step.

  • 6
    "annoying javascript warts" CoffeeScript does not, it just gives sugar and syntax. I can avoid the warts myself, and I do.
    – Raynos
    Commented Oct 12, 2011 at 19:19

Not the answer you're looking for? Browse other questions tagged or ask your own question.