On 09/18/2014 04:18 PM, Kent James wrote: > Substituting var for let does not result in code that behaves identically to > previous code, so I can't see why that would be proposed.
The proposal would be to perform the substitution only for let at "body level" of a function. (And for global let -- which requires its own semantic changes, see bug 589199, that are in progress but not complete yet.) So this: let s = "valid"; { let s = "invalid";} dump(s); would be converted to this: var s = "valid"; { let s = "invalid";} dump(s); with no semantic change. This substitution is absolutely not a good idea in the long run. In the short run, for a release or two...maybe. But that's a veeeery hesitant maybe. I'm leery of introducing these deviations into the language, such that people write code expecting the standard semantics and are surprised to find the code doesn't work as expected in other contexts. How should addons that inject code into pages behave, for that code? Is this something that an addon author could easily predict? I could well imagine it working either way. I'd really rather not go down this path if we can help it. Jeff _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform