block-lambda revival

David Herman dherman at
Thu Jun 23 15:17:52 PDT 2011

> Self executing function expressions

Terminology nit: I think Ben Alman's right that "self-executing" is confused terminology. I like his proposed term IIFE (pronounced: "iffy"):

> (-> {
> // multi-line
> }())
> {||
> // multi-line -- i'm assuming there wouldn't need to be parens
> around the whole thing because block lambdas are expressions not
> statements (is this the case with arrow?)
> }()

It might work with an extra token of lookahead.

But I don't find that argument particularly compelling. Given the addition of `let' and modules, IIFE's shouldn't be nearly as important anymore.

(For the record, I'm undecided on the various shorter-function syntaxes. Just not particularly convinced by this argument.)


More information about the es-discuss mailing list