Sign in through GitHub

RailsCasts Pro episodes are now free!

Learn more or hide this

Trevor Burnham's Profile

GitHub User: TrevorBurnham


Comments by Trevor Burnham


Well, having to go through a compile step is obviously a downside, though Rails makes this very transparent. (And in my experience, many of the things that you get as compile-time errors in CoffeeScript would have been run-time errors in JavaScript, where your typo would have gone unnoticed until you click a particular button... as I say in my book, "The compiler's here to help.")

Perhaps the biggest downside is that your code will become obsolete as new CoffeeScript versions are released. This is, of course, true of almost any language (see: Ruby), but if you're writing pure JavaScript, you can be sure that browsers will continue to run it for as long as the web as we know it exists. CoffeeScript has seen few changes since 1.0 came out in December (1.1.0/1.1.1 mostly just fixed bugs and improved the REPL), but it'll continue to evolve in the future, and that evolution will inevitably break backward compatibility.

Still, being able to write code more quickly and read it more easily is such a huge win that I wouldn't hesitate to use it on almost any project.


Ryan, you were at my talk at RailsConf, right? Thanks for finally giving the overview everyone wanted me to provide. :)

As to the discussion of whether learning/using CoffeeScript is worth it: Check out some of the blurbs on my CoffeeScript book, including one from Brendan Eich, the creator of JavaScript (who was kind enough to review a draft and even offered a few corrections).

Yes, there are downsides to using CoffeeScript rather than JavaScript, but the benefits