excluding features from sloppy mode

Kevin Smith khs4473 at gmail.com
Mon Dec 31 20:36:20 PST 2012

> 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.

Inline modules only in strict mode, in accordance with the rule.  Only
>> out-of-line modules are implicitly strict.
> Any use-case-based rationale?

In the end, I don't see any reason to write new code that is not structured
as a collection of out-of-line modules (module files).  Who knows, I might
be missing a valid use case for non-module scripts though...

>     * 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";

> 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.

> 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.

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.

Happy New Year!

{ Kevin }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20121231/5d0bc0e2/attachment.html>

More information about the es-discuss mailing list