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

For classes, I'm still unclear as to why you might even use the thin arrow, lest you're providing a mixin. Thoughts?


The constructor doesn't need one, and there is a small performance hit for binding =>.

Mixins... Can you show me an example?

Times when you need a reference to a canonical function object, like with $.proxy and $.unbind. (CoffeeScript could implement => to set the original function as a property of the bound function)

Added a question on github: https://github.com/jashkenas/coffee-script/issues/1934




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

Search: