On 13 September 2013 18:39, Oliver Hunt <[email protected]> wrote:
> The problem with temporal dead zones is that they lead to weird behaviour in 
> edge cases, and almost all of them should be syntactically identifiable as 
> errors up front.  The problem is that you can only _almost_ get syntax 
> checked behaviour upfront because eval.

There must be a misunderstanding -- eval is not relevant to the issue
that TDZ is addressing.  The issue is mutual recursion between
bindings that can perform arbitrary (higher-order) computations.  In
that situation, it is generally impossible to ensure the absence of
errors without a type system.  And even with one, it is tedious to the
degree that it is arguably impractical.  So, as long as JavaScript
allows that (and I don't see how we can change that), TDZ is the
best/only we can do.

What "weird edge case" do you have in mind? I cannot imagine anything
that isn't even weirder without TDZ.

/Andreas
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to