Function Syntax

Brendan Eich brendan at
Thu May 12 13:06:24 PDT 2011

On May 12, 2011, at 10:55 AM, Brendan Eich wrote:

> Ruby is far from simple, btw. Check out
> and the wikipedia page it references.
> Looks like but not lambda can return from its caller.

From it should be clear I was missing the "block" target. Blocks are syntactically restricted to being downward funargs. Only if reified as Procs do they potentially escape to be called later when their lexical parent method could have already returned.

IOW, blocks are restricted to being downward-funargs by syntax at their expression site, and by default in the callee (without the & before the corresponding formal parameter).

When we considered lambdas (the "Allen's lambda syntax proposal" thread from late 2008 to early 2009), we did not try to confine them syntactically to actual parameter lists. Did we miss a key restriction or feature of Ruby? I'm not sure, I'm too much a Ruby n00b.


More information about the es-discuss mailing list