migrating `let' and `const'

Brendan Eich brendan at mozilla.com
Wed Nov 16 11:02:02 PST 2011

On Nov 16, 2011, at 3:05 AM, Andy Wingo wrote:

> Hi again,
> Please excuse my ignorance, but:

No problem, we did not talk about how opt-in works.

> On Tue, 2011-11-15 at 07:41 -0800, Brendan Eich wrote:
>> To quote Waldemar from
>> https://mail.mozilla.org/pipermail/es-discuss/2010-October/011972.html
>> "It's a judgment call, and I'd take these on a case-by-case basis.
>> For const and let, I see little harm in browsers allowing them now in
>> strict mode with the purely non-hoisting (C++-like) scoping rules,
>> particularly if they complained when you accidentally declared a
>> variable twice directly in the same block."
> So the current idea is that ES.next has different syntax and semantics,
> and so in general the strategy would be to offer <script type="harmony">
> and otherwise some form of "transpilation".

Right ("harmony" is a placeholder, the likely minimum but not best form would be type="application/ecmascript;version=6").

> But you are also proposing to move some ES.next features into the
> existing ES5.1 strict mode already provided by implementations?

No. Rather, Harmony (which is opt-in per above) is based on ES5 strict.

Compiling from ES.next to ES5 is doable but it may not match the "transpiling" (ugly word) definition.


More information about the es-discuss mailing list