func 5, {
event: -> 45,
val: 10}
Is reasonable but func 5, {
event: (e) ->
if e.something
36
else
45,
val: 10}
Really ought to be split up for readability no matter what programming language you use. And besides, the only issue is the extra comma causes it not to compile.To be fair, the `->` vs `=>` (which `this` is `this`?) for class members is confusing. I'd almost prefer class members didn't give you the option and defaulted to `=>`.
The "variable capture" section is overblown, though. You're a lot less likely to run into this issue than the classic JavaScript "I forgot `var` and now my variable is global.
My biggest complaint is actually the implicit returns. Sometimes I forget a return statement but it works anyway because of this feature. Then I come back later and modify the function slightly only to spend a bunch of time figuring out why it's returning `undefined`.