An news on block lambda versus arrow function syntax?

# Axel Rauschmayer (14 years ago)

Is there a consensus building in TC39 for one or the other? Will any of them make it into ES.next?

What I like about block lambdas is that one will automatically use lexical "this" where necessary. Just yesterday, dynamic "this" versus lexical "this" bit me again.

Axel

# Dmitry A. Soshnikov (14 years ago)

On 30.08.2011 18:22, Axel Rauschmayer wrote:

Is there a consensus building in TC39 for one or the other? Will any of them make it into ES.next?

What I like about block lambdas is that one will automatically use lexical "this" where necessary. Just yesterday, dynamic "this" versus lexical "this" bit me again.

Fat arrows IIRC also bind this lexically. The main thing of blocks is TCP where we can exit from passed closures to the outside, but not to the caller.

Personally, I also like both: and arrows and blocks :)

Dmitry.

# Mark S. Miller (14 years ago)

On Tue, Aug 30, 2011 at 7:26 AM, Dmitry A. Soshnikov < dmitry.soshnikov at gmail.com> wrote:

On 30.08.2011 18:22, Axel Rauschmayer wrote:

Is there a consensus building in TC39 for one or the other? Will any of them make it into ES.next?

What I like about block lambdas is that one will automatically use lexical "this" where necessary. Just yesterday, dynamic "this" versus lexical "this" bit me again.

Fat arrows IIRC also bind this lexically. The main thing of blocks is TCP where we can exit from passed closures to the outside, but not to the caller.

Personally, I also like both: and arrows and blocks :)

On this matter, the one point on which we have achieved consensus is not to do both ;).