Block Lambdas: break and continue

Axel Rauschmayer axel at rauschma.de
Mon Jan 16 10:16:41 PST 2012


> However, block lambdas are often evaluated for a value and none of the current continue/break based solutions include a way to provide an explicit continuation value.  Here is an idea for that:
> 
>     foo  {||
>        exit: {
>             ...
>             if (...) break exit with "early";  //[no LineTerminator here] before "with"
>             ...
>         }
>    };


+1

It might make sense to also introduce an “unlabeled” break-with that exits from the current (unlabeled) block.

-- 
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/20120116/960c26b5/attachment-0001.html>


More information about the es-discuss mailing list