10

Click here to load reader

CoffeeScript

Embed Size (px)

Citation preview

Page 1: CoffeeScript

CoffeeScript

5 Minutes about my recent dive into

Thursday, 2 September 2010

Page 2: CoffeeScript

Javascript is a powerful, lambda-based language trapped in a misleading C syntax and made difficult by design flaws.

Thursday, 2 September 2010

Page 3: CoffeeScript

JSLint compliant, well-mannered Javascript is a bit unnatural

==voidvar

var foo = function foo( ) {};undefined, null, falsynew Boolean(false)

Switch fall through on string onlyLoose typing / objects

Global variablesUnintended shadowing

Thursday, 2 September 2010

Page 4: CoffeeScript

(examples)

The language I want it to be

Thursday, 2 September 2010

Page 5: CoffeeScript

Simpler, cleaner JS

Python, Ruby, yaml inspired functional OO language that compiles to the good parts of JS.

Available as a Node.JS utility.

Thursday, 2 September 2010

Page 6: CoffeeScript

JSLint compliant, readable output(try the website)

Courtesy: http://jashkenas.github.com/coffee-script/

Thursday, 2 September 2010

Page 7: CoffeeScript

Nice with JQuery and Underscore.js

(In fact the author jashkenas @ Github ported Underscore.js to CoffeeScript)

Thursday, 2 September 2010

Page 8: CoffeeScript

(sample)

Structure your prototypes

CoffeeScript and Raphaël

Thursday, 2 September 2010

Page 9: CoffeeScript

CoffeeScript with Node.JS backend

Credit: dhotson @ tumblr

Thursday, 2 September 2010

Page 10: CoffeeScript

http://jashkenas.github.com/coffee-script/

Warning: still pre-1.0It is a moving target

Jison parserCompiler written in CoffeeScript

http://raphaeljs.com/

Thursday, 2 September 2010