4 ms·
What is "procedural block scoped code" and why do you think var as a binding construct (ignoring the initialiser) is control-flow sensitive? It's not. /be
by BrendanEich 12y ago
What is "procedural block scoped code" and why do you think var as a binding construct (ignoring the initialiser) is control-flow sensitive? It's not.
/be
- mavdi 12y agoI mean people will widely use for, while, switch statements instead of maps, hashes, weak maps etc. They will be setting variables in parent scope, procedural step by step thinking, rather than passing functions, chaining things etc. I personally don't like some of the ES6 additions, but this one is just a step too far. For us mere mortals that is.
- BrendanEich 12y agolet composes nicely with all the statement forms. You can even do `for (let x ...)` and have a proper let binding per iteration, for closures that capture x in the body. /be
- mavdi 12y agoYep and it's awesome to have that but I personally hardly ever use for loops.