TDZ is weird and for the sake of more intuitive behavior in some common cases leads to completely unintuitive behavior in other, uncommon ones. I wish they didn’t design this like a trade off, but I’m guessing their hands were tied, and anyway it’s too late now. I’m not sure I’m a fan of TDZ. I’ll probably end up shelving it in the back of my mind in the same place as other JavaScript oddities such as ASI rules and function statements.
TDZ is weird and for the sake of more intuitive behavior in some common cases leads to completely unintuitive behavior in other, uncommon ones. I wish they didn’t design this like a trade off, but I’m guessing their hands were tied, and anyway it’s too late now. I’m not sure I’m a fan of TDZ. I’ll probably end up shelving it in the back of my mind in the same place as other JavaScript oddities such as ASI rules and function statements.