andrea.giammarchi at gmail.com
Thu May 14 19:53:16 UTC 2015
like I've replied to Domenic, you need to transpile if you want function
declaration block-scoped backward compatible and all other ES6 goodies.
babeljs would be my pick:
On Thu, May 14, 2015 at 8:40 PM, Alexander Jones <alex at weej.com> wrote:
> Ah, thanks for explaining! What about the Temporal Dead Zone of let,
> or const binding semantics, for those of us who are obsessive enough to
> desire that kind of thing everywhere?
> On Thursday, May 14, 2015, Bergi <a.d.bergi at web.de> wrote:
>> Alexander Jones schrieb:
>> > On Thursday, May 14, 2015, Domenic Denicola <d at domenic.me> wrote:
>> >> They can, in fact, be scoped in a for loop.
>>> That's not what I see, in strict mode at least, which I assume most
>>> consider de facto by now!
>>> From V8:
>>> SyntaxError: In strict mode code, functions can only be declared at
>>> level or immediately within another function.
>> That's ES5. In ES6, function declarations are allowed in blocks - with
>> the new block scope semantics. This was only possible as ES5 strict mode
>> held that spot open so now it doesn't break anything :-)
>> Yes, it will need a while until people get accustomed to that.
>> es-discuss mailing list
>> es-discuss at mozilla.org
> es-discuss mailing list
> es-discuss at mozilla.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss