What's the point of CoffeeScript?
I'm reading a tutorial on PouchDB and like always I run into CoffeeScript. What's the point of it?
It got me thinking: With the release of ES6 in June of this year, does it still make sense to use coffeescript today?
Coffeescript vs ES6
Having played a little with the ES6 syntax, here are my initial thoughts.
ES6 actually solves alot of things coffeescript did. Features such as proper classes, destructuring, string interpolation and even list comprehension. However you may still want to go with coffeescript for its expressive nature and fewer brackets.
# http://coffeescript.org/#switch switch day when "Mon" then go work when "Tue" then go relax when "Thu" then go iceFishing when "Fri", "Sat" if day is bingoDay go bingo go dancing when "Sun" then go church else go work
and a classic example:
2. Coffeescript compiles to ES5 just fine.
Which leads me to my third point...
3. Coffeescript could eventually support fully compling to ES6 syntax?
This would be pretty huge. I'm guessing there's no way of knowing if it'll ever happen but if not by the current authors, then likely a community-backed fork of the coffeescript project will emerge someday.
Pick your poison
It really comes down to personal preference really but you would not go amiss if you decide on coffeescript today. Coffeescript is still very much kicks ass 5 years down the line and it'll be interested to see what's next on its roadmap!
to clarify, I know there are a few new ES6-only features available but it is common knowledge at this point that not all of them can be transpiled to ES5. ↩︎