You are here: Home // JavaScript // 032 RC CoffeeScript

032 RC CoffeeScript

CoffeeScript is a language written by Jeremy Ashkenas that compiles to Javascript. Its syntax is much more friendly than native JavaScript. Especially if you’re used to languages like Ruby or Python.

As or Rails 3.1, CoffeeScript is available by default and a coffeescript file is created in /app/assets/javascripts every time you run the scaffold generator.

A few of my favorite features of the language are:

  • I can ignore parenthesis (mostly), semi-colons, and curly braces
  • Function notation
  • Objects with nested notation
  • Variable safety (not creating globals)
  • Splats on lists
  • Classes
  • Always returns last expression
  • String interpolation

I don’t like:

  • Operator aliases

Resources:

1 Response to " 032 RC CoffeeScript "

  1. anton says:

    Thank you for great podcast, coffeescript is really awesome!

Leave a Reply

Copyright © 2009 Rails Coach. All rights reserved.
Designed by Theme Junkie. Powered by WordPress.