There are still temporal dead zone cases that can't be statically analyzed -- at least not without an aggressive higher-order control flow analysis, and even then analysis is approximate so we'd have to mandate false positives or bail to dynamic checks.

Isn't the issue that strict mode would dynamically check these in some implementations, and statically check them in others?

/be

Andreas Rossberg wrote:
On 20 March 2012 21:46, Allen Wirfs-Brock <[email protected] <mailto:[email protected]>> wrote:

    It is an open issue whether an implementation should be
    permitted/required/forbidden to report the statically detectable
    cases as early errors.


The obvious and (and IMO right) rule is that static checks should be required iff the declaration is in strict code -- which generally implies that the use site and any scope in-between is strict code, too. So it can be statically checked in all those cases. In sloppy mode, you're on your own as usual.

The only potential problem I can foresee with that is the current strict mode loop hole with indirect 'eval' in combination with const declarations in the global scope, depending on how exactly we will decide on global scope semantics. (That is, we should try to find a semantics that maintains the above invariant.)

/Andreas

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

Reply via email to