excluding features from sloppy mode

Brendan Eich brendan at mozilla.com
Mon Dec 31 13:38:42 PST 2012


Brandon Benvie wrote:
> The only motivation for me is in attempting to get rid of there even 
> being two modes. I don't really care if it was strict or not strict, 
> just that there's only one of them. Obviously the horse left the barn 
> for ES5 long ago, but the desire to collapse down to one mode in as 
> much code as possible is still motivating.

Indeed, this is a shared goal, happy to have it solved somehow. We're 
just arguing about "better" before committing.

> I saw bundling as many carrots in with strict mode as a way to 
> leverage developers into the single mode JS utopia of the future. I 
> appreciate the arguments about the negatives of forcing the pragma 
> incantation though.

Thanks.

> How about making ES6 features only available inside modules? I guess 
> that's kind of a cop-out though, since you don't always need a module. 
> I still yearn for that utopian JS future where there is no need for 
> two modes.

Utopia means no-place.

If between some or all new body forms imputing strictness, and 
evangelizing/teaching "use strict" or better means of opting in, we get 
to a world akin to Perl 5 in its modern form (CPAN etc.), where strict 
code predominates, that's good enough for me.

/be


More information about the es-discuss mailing list