excluding features from sloppy mode

Brendan Eich brendan at mozilla.com
Mon Dec 31 20:50:49 PST 2012


Kevin Smith wrote:
>
>     The only place 'let' is contextually reserved in the
>     quasi-consensus from the last TC39 meeting is at the start of a
>     statement, when followed by an identifier, '{', or '['.
>
>
> Right - which makes "let" a "second class identifier" (sorry, 
> made-up-term), since it can't be used in "let[x] = y".  I 
> shed dodecahedron-shaped tears at the thought.

Yes, you're right -- no such backward compatibility problem for 
'module'. I'm with ya.

>
>             * It's an eyesore, which I think is a non-trivial objection.
>
>         Yes, but it's not required in out-of-line modules.  Which will
>         predominate quickly in new code (my prediction, yes).
>
>
>     I don't think so in the browser. Concatentors will be required to
>     minimize requests, which will make modules inline again.
>
>
> Yes, but inline modules (actually pre-loaded module registrations) 
> within a larger out-of-line module:
>
>     // implicit strict because we're in an out-of-line module here
>     module "a.js" { ... }
>     module "b.js" { ... }
>     export * from "b.js";

Or a larger script tag!

That will need "use strict" or else.

>         Yes, it is easy to leave out, at least until you want to use
>         an ES6 feature.  Then you get spanked : )
>
>
>     Yeah, that's the thing I find turns off people at the "social BS"
>     level. The Strunk&White-ian prescriptivism rings false and the
>     kids start sassing off the gray-hairs. Not good for the Shire :-P.
>
>
> I think this is a valid point, actually.

Thanks, it is a delicate one (I'm a prescriptivist about crucial 
matters, in English as in JS -- one must choose one's battles, though).

>     Let's take a breather. I am not out to force anyone into a bitter
>     concession.
>
>
> Nah - all dry humor there.  I have 4 small children so this is about 
> as much fun as I'm allowed to have on a New Year's Eve.

LOL, I have you beat (5).

> The "compromise" is actually serious, though.  To reuse the feces 
> metaphor, it doesn't so much polish the turd, as set it right out on 
> the sloppy-mode sidewalk.  Won't be long before people start riding 
> their ES6 bikes on the strict side of the street.

Everyone wins :-).

> Happy New Year!
Backatcha!

/be


More information about the es-discuss mailing list