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.
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.
/be
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
>
> - possibly rejecting non-buggy programs based on existing JavaScript programming styles
>
> 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.
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.