3 ms·
I disagree, function scope is not going away. So I still have to understand that. If I mix in lexical scope, I now have to think about 2 scopes, which makes my
by Touche 11y ago
I disagree, function scope is not going away. So I still have to understand that. If I mix in lexical scope, I now have to think about 2 scopes, which makes my life worse.
- pfooti 11y agoI think one could argue that function scoping is no longer necessary - there's nothing you would do with function scoping that you couldn't do with lexical-block scoping, since with lexical scoping, you can still declare variables at a function block scope. The only real benefit I can think of from function scoping is hoisting, reliance upon which strikes me as an antipattern.