IIAFEs?

Axel Rauschmayer axel at rauschma.de
Sat Jun 1 16:12:37 PDT 2013


> But they're not fully interchangeable,

No, they aren’t.

> for example I can exit a function at any point with a return, but can I exit a block at any point with a break or something?

You can give the block a label, say, `foo` and then exit via `break foo`.

> Also a function returns a value, does a block evaluate to something?

No it doesn’t. David Herman proposed a “do expression” that would be able to do so:
http://wiki.ecmascript.org/doku.php?id=strawman:do_expressions

-- 
Dr. Axel Rauschmayer
axel at rauschma.de

home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130601/b9f131df/attachment.html>


More information about the es-discuss mailing list