Function declarations with lexical `this`?
Brendan Eich
brendan at mozilla.com
Tue Jun 25 13:26:21 PDT 2013
Allen Wirfs-Brock wrote:
>
> On Jun 24, 2013, at 11:37 PM, Axel Rauschmayer wrote:
>>
>> Given that generators use the `this` that the function would have (at
>> least that’s how I read the spec – `this` is the global object for a
>> non-strict generator function, `undefined` for a strict generator
>> function, the receiver of the method invocation for a generator
>> method), a generator arrow function would even be useful: a generator
>> with lexical `this`.
>
> see https://bugs.ecmascript.org/show_bug.cgi?id=1489
Whew -- glad that ended up on the right page. :->
On generator arrows, I say YAGNI. Anyway, as Mark said: not for ES6.
/be
>
>
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
More information about the es-discuss
mailing list