Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

dear coffeescript,

thank you for =>



The fat arrow is the best piece of syntactic sugar cs offers.


I like the class and for comprehensions sugar very much as well.


My favorite is the Maybe-monad-esque ? syntax. It lets you write expressions like this: obj.a?.b?.c?() which will execute normally if all those properties exist, but return null instead of failing if they don't.


do (foo) ->

is also a nice one


this x1000.

I can't count the # of times my tests were failing on new code I wrote and it took me one second to look at is and say, "Oh yeah... this" and just flip -> to =>. So easy.


thanks, I have been using cs recently and didn't even know about it!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: