Ticker

6/recent/ticker-posts

CoffeeScript: A New Language With A Pure Ruby Compiler, the upcoming trends

source : http://www.rubyinside.com/coffeescript-a-new-language-with-a-pure-ruby-compiler-2921.html
By Peter Cooper — January 4th, 2010



coffeescript.png CoffeeScript (GitHub repo) is a new programming language with a pure Ruby compiler. Creator Jeremy Ashkenas calls it "JavaScript's less ostentatious kid brother" - mostly because it compiles into JavaScript and shares most of the same constructs, but with a different, tighter syntax.

To get a feel for the language, check out this example code (CoffeeScript on the left, resulting JavaScript on the right):

cofeescriptdemo.png

As a Ruby project, you can get the CoffeeScript compiler installed with a simple gem install coffee-script or check out the code from/on GitHub. The code is worth a look as it's notably quite vanilla with hand crafted Ruby covering the lexer and code generation and Racc built code for the parser.


Post a Comment

0 Comments