5 Things I Like About CoffeeScript

The World of JavaScript

This should look familiar...

The World of CoffeeScript

... and this shouldn't look too different


1. Syntax

Borrows from Ruby (e.g., string interpolation) and Python (e.g., whitespace, comprehensions).

2. Functions

Useful enhancements include defaults (bar = "hi") and splats (...args).

3. Classes

Follows the "classical inheritance" pattern with helpers: shortcuts (@), fat arrows (=>), and superclass (super).

4. Existential Operator

An elegant way to avoid TypeError's and replace:

... with:

5. Loops, Comprehensions

Works for arrays and objects.

Issues / Gotchas


slides: bit.ly/nodedc-coffeescript

@ryan_roemer   ryan@loose-bits.com
SpanishDict.com is hiring!