excluding features from sloppy mode

Brendan Eich brendan at mozilla.com
Fri Dec 28 12:30:32 PST 2012

David Herman wrote:
> OK, I've made that same argument recently, I'll take it. I guess what I can retain of that argument is that*if*  modules succeed, then the implicit opt-in will have bought us little.

That I agree with (already).

> But even if*not*, it's not worth proliferating the number of cases that are implicitly strict.

But why isn't it worth the proliferation cost to get the benefit of 
strict-by-fiat classes if those proliferate outside of modules?

To answer that, you have to speculate on costs and benefits of strict 
mode for classes outside of modules, not talk about modules more:

>   Modules are a good place to implicitly opt in to strict mode, because they're a coarse-grained program structuring feature.

And granularity of class vs. module can't matter under the "even if 
*not*" hypothesis we are exploring together in this branch of 

> Classes are finer-grained, especially dynamic classes like in ES6.

The question really is, why have sloppy-mode classes at all? Who wants 
or needs them?

> Meanwhile we don't*need*  the world to use strict. Modules will reinforce strictness on a large scale; classes provide much less reinforcement, and more complexity. Not worth it.

(This just rehashes your assumption and the conclusion we agree follows 
from it!)


More information about the es-discuss mailing list