While there is some overlap in these solutions (particularly while trying to “shim” ECMA support in legacy browsers such as IE8), generally speaking they take different direction.
.coffee files directly to the browser, rather it must first be compiled to a
.js file first.
You can learn all about it on its homepage, where there’s a tool to run CoffeeScript in real-time. I’ll demonstrate just one example here. The basic tenets should be familiar to Rubyists:
- Parens are optional
- Semi-colons are banished
- Lots of syntactic sugar
SugarJS in it’s own words
It has lots in common with Ruby, and even has a comparison page to see the syntactical differences between it and Ruby. So:
All Together Now
Being currently a student of a dynamic language (Ruby) and the ever-growing popularity of this family of languages (i.e. Perl, Python, PHP etc), I may never get to write any non-trivial apps in a language that need to get compiled. As CoffeeScript may be the closest I get, and to satisfy the requirement of at least one XKCD reference, I leave you with this:
All Revisions to this document are visible here
Make yourself useful.