Expression closures - use-cases for shortcut lambda syntax(blocks)

Igor Bukanov igor at mir2.org
Thu Mar 22 01:57:59 PDT 2007


On 21/03/07, Vassily Gavrilyak <gavrilyak at gmail.com> wrote:
> And I understand you, Igor, as a primary generators author.

I has nothing to do with generator authorship in JS or any other language!

> Everything looks like 'for' :-).
> The same with me, everything looks like 'function' :-). We already
> talked about this, shortly.
> I understand that everything can be done with generators. Just why
> with this cool
> new concept, and not plain old function?

Because the question was how to write the example in ES, not how to
write it in ES using only functions.

The result was in fact very readable code which IMO looks better (if
one forgets the loop stigma) than both function(name) expr and name =>
expr  versions. That plus those Y-combinator examples tells me that in
fact name => expr or (\name) expr as syntax sugar are not sufficiently
sweet to justify their existence compared with function(name) expr.

Regards, Igor



More information about the Es4-discuss mailing list