On 20 March 2012 21:46, Allen Wirfs-Brock <[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

Reply via email to