I think arrow works better than just nothing at all
it doesn't need to share semantics because it doesn't share syntax. That said, maybe foo() => {} could bind ;)
-
-
=> looks like =>
-
class X { foo() => { return this; } } let y = new X().foo; y() //=> instance of X
-
sort of wonder why we didn't make concise methods in classes auto-bind now...
-
because that's not how this works in ES functions. Need to start over with new language
-
methods in classes aren't functions (and can diverge some if worth it). F.p.bind is a thing, so not bizarre
-
also quite hard to polyfill efficiently, even with decorators
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.