const initializers: once more unto the breach

Andreas Rossberg rossberg at google.com
Wed Mar 21 10:00:57 PDT 2012


On 21 March 2012 17:47, Brendan Eich <brendan at mozilla.org> wrote:

> 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?
>

Right, but my comment was only about checking of assignments to const
variables. Those are always an error, regardless of TDZ behaviour. (I
probably cut too much context from the quote.)

Checking TDZ behaviour is a different story. It's undecidable in general,
so we should better just leave it alone.

/Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120321/dd93c32f/attachment-0001.html>


More information about the es-discuss mailing list