On Wed, Jul 26, 2017 at 5:55 AM, Andreas Rossberg <[email protected]> wrote:
> And clearly, modes or versions only make things worse in that regard. Strict
> mode already is a pig when it comes to implementation complexity (in
> retrospect, it does not carry its weight IMHO). ES6 made it worse. Our
IIRC, the primary argument for strict mode wasn't implementation
simplicity, but the ability to do sound static analysis.
var x;
function f(a, b) {
a(b);
return x;
}
isn't analyzable because f(eval, 'var x = 1;') could cause the
returned x to refer to a local instead of the outer x but add "use
strict" to either scope and suddenly it is statically analyzable.
When you say that strict mode "does not carry its weight," are you
saying that that the ability to do sounds static analysis doesn't
warrant the additional complexity or are you referring to a different
bundle of benefits?
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss