4 ms·
It also makes the arrow shorthand less useful. Instead of -> {...} replacing function() {...} We get => {...} replacing (function() {...}).bind(this) Why sho
by likeclockwork 12y ago
It also makes the arrow shorthand less useful.
Instead of -> {...} replacing function() {...}
We get => {...} replacing (function() {...}).bind(this)
Why should the less common case get the more convenient syntax? Especially considering when we already have Function.prototype.bind to do this. How could they possibly agree on this but not the thin arrow?
- masswerk 12y agoThere has been some discussion lately of JS being too verbose – this seems to be adding semantic sugar to address this. But introducing ambiguous semantics is quite an other thing.
- camus2 12y agoI really hate the technical choice TC39 made with the arrow function. IT should have been a replacement for ANY kindof function. This is a total let down. Coffeescript syntax makes way more sense.
- cpeterso 12y agoHow does an arrow function's implicit bind(this) poses a problem or limits generality? (Honest question; I'm not a JS wizard.)
- camus2 12y ago> How does an arrow function's implicit bind(this) poses a problem or limits generality? Well you cant use it unbound. I dont want to declare functions bound to a scope I want a quick way to declare functions.