Why use CoffeeScript?

Posted on

I can’t speak for you, but where I can, I like to use CoffeeScript because:

  • it makes my life easier by helping me avoid basic errors like using ==
  • it looks and feels more like Ruby which means I don’t have as far to go when switching contexts between Ruby and client side code
  • I don’t have to do bizarre things like create self calling functions or functions that sit in between public and ‘private’ methods just to obtain some degree of encapsulation**
  • jasmine specs look lovely vs eeew!

I used to think that CoffeeScript was somewhat pointless as you might as well learn Javascript, and learn it properly. Then I tried it and I didn’t miss the power.

** edit: I rather suppose I do actually, as the compiled Javascript is full of such nonsense. I just don’t have to see it quite so much. Somethings are best swept under the carpet…

Leave a Reply

Your email address will not be published.