block lambda revival

Brendan Eich brendan at mozilla.com
Sat May 21 07:43:01 PDT 2011


On May 20, 2011, at 9:55 PM, Peter Michaux wrote:

> On Fri, May 20, 2011 at 5:54 PM, Brendan Eich <brendan at mozilla.com> wrote:
>> An essential part of this proposal is a paren-free call syntax
> 
> Why is that essential?

The argument, as I understand it from Smalltalk, Ruby, and E experts, is empirical, and in part a matter of intentional design: users write blocks as actual parameters to make control abstractions. Most such abstractions taking block arguments do not let those blocks escape through the heap or a return value -- the blocks are downward funargs. This aids in making new control abstractions more efficient than functions to implement, as well as more usable. Built-in control flow statements have (optionally) braced bodies that do not need parenthesization, so why should new ones created by users passing blocks?

When I wrote essential, I was not claiming that there's a logical proof of necessity. Rather I was declaring that this strawman includes paren-free block-argument-bearing call expressions as an essential design element. Chopping it out chops down the whole strawman.

/be


More information about the es-discuss mailing list