whither TDZ for 'let' (was: On dropping @names)
brendan at mozilla.com
Thu Dec 27 23:25:46 PST 2012
This thread needs a new subject to be a spin-off on the very important
topic of to TDZ or not to TDZ 'let'. IMHO you neatly list the risks below.
I had swallowed TDZ in the face of these risks. I'm still willing to do
so, for Harmony and for greater error catching in practice. I strongly
suspect declare-at-the-bottom and other odd styles possible with 'var'
won't be a problem for 'let' adoption. However, we need implementors to
optimize 'let' *now* and dispell the first item below.
David Herman wrote:
> Here's what it comes down to. Above all, I want let to succeed. The absolute, #1, by-far-most-important feature of let is that it's block scoped. TDZ, while clearly adding the bonus of helping catch bugs, adds several risks:
> - possible performance issues
> Are those risks worth taking? Can we prove that they won't sink let? "It's fairly obvious" doesn't give me a lot of confidence, I'm afraid.
More information about the es-discuss