http://weepy.github.com/kaffeine/
- Backwards compatible with JavaScript
- Uses @foo to to get the "real" this.foo
- Uses CPS folding to flatten callbacks
- Multiline strings, which come in handy
- for(n of [1, 2, 3]) array iteration
- String interpolation: "#{foo} was here"
- Implicit functions: (foo) { alert(foo); }
- Pipe operator for chaining the first arg
- Default arguments, optional call parens
- Implicit return (nice with implicit funcs)
Out of those, I think callback unfolding and the pipe operator are the most interesting beyond adding some niceties:
ok = stomach.save!() meal.complete = oktranslates to:
stomach.save(function(ok) {
meal.complete = ok
})
and...result = input | fn argstranslates to:
result = __.fn.call(this, input, args)