Hegel2011的博客

读书 - 工作 - 生活 - 笔记

Sam Stephenson's Better JS With CoffeeScript

http://www.tudou.com/programs/view/pg-PTg9Hcfc/

Won’t write js again.

2004 Google Map ,build wonderful app with just html & js
improve the language , prototype

1.function Syntax
2.Significant Whitespace
not see braces
3.Bare Objects, no braces needed
4.Everything’s an Expression
5.Comprehensions

1
2
3
  names = for person in people
     person.name
   返回[]borrow from python

6.Classes && Inheritance
extends, construct, @, $el=super

7.Bound Functions
=> 取代了bind(this)
8.Conditionals
?
9.Destructuring, Assignment
{name, age} = person
[first,seconde] = s.split(//) 必须要是{}或者[]对象
10.String Syntax
#{}

Included file 'twitter_sharing.html' not found in _includes directory