7 min

032 RC CoffeeScript Rails Coach

    • Technology

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:

CoffeeScript Webpage
CoffeeScript Cookbook
CoffeeScript Basics (video)
CoffeeScript: The Cool Parts (video)

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:

CoffeeScript Webpage
CoffeeScript Cookbook
CoffeeScript Basics (video)
CoffeeScript: The Cool Parts (video)

7 min

Top Podcasts In Technology

Acquired
Ben Gilbert and David Rosenthal
All-In with Chamath, Jason, Sacks & Friedberg
All-In Podcast, LLC
Hard Fork
The New York Times
Lex Fridman Podcast
Lex Fridman
Waveform: The MKBHD Podcast
Vox Media Podcast Network
Better Offline
Cool Zone Media and iHeartPodcasts

More by DevChat.tv

React Native Radio
Jamon Holmgren, Robin Heinze, Mazen Chami
Ruby Rogues
Charles M Wood
JavaScript Jabber
Charles M Wood
Ruby Rogues
Charles M Wood
Adventures in Angular
Charles M Wood
JavaScript Jabber
Charles M Wood