4 ms·
Hoisting is still lexical, except the scope is function level. But the point is moot, since we have `let` which behaves "normally" now. `this` is not non-lexic
by spion 7y ago
Hoisting is still lexical, except the scope is function level. But the point is moot, since we have `let` which behaves "normally" now.
`this` is not non-lexical scope, its argument passing. Its the most confusing wart in JS but its actually not a fundamental design flaw, just a syntactic wart: https://gist.github.com/spion/7180482 https://gist.github.com/spion/7180482
> I'd argue that even if it's not being used it still adds complexity when reading or debugging.
I disagree, it barely adds a couple of bits of noise here and there. Definitely not a deep flaw.
The worst JS flaws are in its anemic standard library and the pre-promises backend standard library included with node. They are overdue for a refresh.