3 ms·
‘this’ is not in any sense dynamically scoped. It's just a function parameter, assigned implicitly based on the context of the call.
by pwdisswordfish2 7y ago
‘this’ is not in any sense dynamically scoped. It's just a function parameter, assigned implicitly based on the context of the call.
- DonHopkins 7y agoIf that's a fact, then please tweet to Brendan Eich that he was wrong when he referred to "dynamic this binding" as the rationale for adding fat arrow functions to JavaScript in his fat arrow proposal, and take your argument up with him, not me: >"dynamic this binding is an oft-fired footgun" -Brendan Eich https://tc39wiki.calculist.org/es6/arrow-functions/ https://tc39wiki.calculist.org/es6/arrow-functions/
- BrendanEich 7y agoI wrote dynamic binding, that's not the same as dynamic scope.