block-lambda revival

Brendan Eich brendan at mozilla.com
Fri Jun 24 20:50:05 PDT 2011


On Jun 24, 2011, at 7:18 AM, Jorge wrote:

> On 24/06/2011, at 01:31, Mike Shaver wrote:
>> On Jun 23, 2011 6:14 PM, "Jorge" <jorge at jorgechamorro.com> wrote:
>> 
>>> JS -unlike other languages- is important enough that it does not need to follow these (dubious) trendy fashions to become popular. Nor to survive.
>> 
>> Do you really believe that these proposals are motivated by fashion?
> 
> No. That's not what I meant. 
> 
> There's other (new) languages that need to sell "something" to gain traction and become popular. But JavaScript just does not need to do that.

Let's get back to the problems with JS functions:

1. Overlong syntax, mainly due to 'function' and 'return' keywords, but also due to lack of expression body alternative or combination.

2. Dynamic 'this' parameter binding.

3. Tennent's principle of abstraction violations other than 'this'.

Arrow function syntax addresses 1 and (via =>) 2. Block lambda revival addresses all three. I think both are worth considering carefully, never mind fashion, for these reasons.

/be





More information about the es-discuss mailing list