Allen Wirfs-Brock wrote:
On Mar 21, 2012, at 10:11 AM, Brendan Eich wrote:
> Andreas Rossberg wrote:
>> Right, but my comment was only about checking of assignments to const
variables. Those are always an error, regardless of TDZ behaviour.
>
> Agreed, absolutely. In all-strict code we know all the bindings, we see all assignments.
Yes, but just because a function is strict doesn't mean that everything is
strict:
{const c=0;
with (someObj) {
(function() {"use strict"}; c=2})();
}
}
Yup, hence my "all-strict" short-hand for Andreas's more carefully
worded "iff the declaration is in strict code -- which generally implies
that the use site and any scope in-between is strict code ...."
/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss