3 ms·
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
by jaekwon 15y ago
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.
- teejae 15y agoFor classes, I'm still unclear as to why you might even use the thin arrow, lest you're providing a mixin. Thoughts?
- jaekwon 15y agoThe 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 https://github.com/jashkenas/coffee-script/issues/1934
- ryanflorence 15y agoThat'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.