3 ms·
As I understand it, yes, 'var' is now obsolete. 'let' does the same thing with less confusing semantics.
by svachalek 11y ago
As I understand it, yes, 'var' is now obsolete. 'let' does the same thing with less confusing semantics.
- e12e 11y agoSo, 20+ years ago, javascript was a scheme(-like langauge) -- but was disguised as java for marketing -- now we can go back to a more scheme-like javascript? I wonder if we'd be better off with a proper scheme in the browser in the first place...
- albemuth 11y agoClojureScript is pretty cool!
- Touche 11y agoI 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.