I think arrow works better than just nothing at all
-
-
for consistency should also allow foo() => {} Also semantics is not same as arrow function is inconsistency
1 reply 0 retweets 0 likes -
it doesn't need to share semantics because it doesn't share syntax. That said, maybe foo() => {} could bind ;)
1 reply 0 retweets 0 likes -
=> looks like =>
1 reply 0 retweets 1 like -
class X { foo() => { return this; } } let y = new X().foo; y() //=> instance of X
1 reply 0 retweets 0 likes -
sort of wonder why we didn't make concise methods in classes auto-bind now...
1 reply 0 retweets 3 likes -
because that's not how this works in ES functions. Need to start over with new language
1 reply 0 retweets 0 likes -
methods in classes aren't functions (and can diverge some if worth it). F.p.bind is a thing, so not bizarre
2 replies 0 retweets 0 likes
also quite hard to polyfill efficiently, even with decorators
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.