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

The arguments you use against CoffeeScript are actually the reasons why I love CoffeeScript and the fat arrow.

To see what scope the fat arrow is bound to, all you need to do is scan up the parent scope in the file and look for a thin arrow (or a class declaration).

Your "whitespace problem" is my solution.



That's a good point, and I've actually adjusted my color scheme to make fat and thin arrows different brightness, the fat brighter to call it out more.


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




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: