CoffeeScript to Closure

This is a demo of translating CoffeeScript to Closure-Compiler-friendly JavaScript.

One of the primary complaints about the Closure Library is about how verbose it is, so one way to address this problem is to generate Closure-Library-style code using a more minimalistic syntax (i.e. CoffeeScript). This makes it possible to leverage the Advanced mode of the Closure Compiler (and the existing functions in the Closure Library) while writing much less code. This demo is powered by a fork of the CoffeeScript codebase that adds a --google option to the coffee executable to generate the Closure-style JavaScript.

Learn more about Closure Mode for CoffeeScript

Edit CoffeeScript code on the left and JavaScript will automatically be generated on the right.
class example.Person constructor: (@first, @last) -> getFirst: -> @first setFirst: (first) -> @first = first getLast: -> @last setLast: (last) -> @last = last toString: -> "#{@first} #{@last}" class example.Adult extends example.Person constructor: (first, last) -> super(first, last) toString: -> "I am an adult named " + super()