Control Invocation: proposal for simplification

Neal Gafter neal at gafter.com
Tue Jan 5 08:58:18 PST 2010


Replacing useful functionality with less useful and less intuitive behavior
isn't really a constructive simplification.

On Tue, Jan 5, 2010 at 12:49 AM, Gernot Neppert <mcnepp02 at googlemail.com>wrote:

> 1. Limit the difficulties with non-local transfer to "return",
> eliminating "break" and "continue".
>

I'm not sure what difficulties you're referring to.  I haven't heard anyone
complain about nonlocal break and continue being difficult to understand.

2. Waive transparency of "return" in lambdas.
>
> In order to limit non-local transfer issues to "return", I suggest
> scrapping the "for-loop abstraction syntax" altogether.
> This will make all issues with top-level "breaks" and "continues"
> within lambdas disappear, since the compiler will flag them as the
> usual error.
>

The nonlocal transfers "break" and "continue" arise when they are used to
break and continue from enclosing contexts.  The "for-loop" abstraction
syntax is separate from that.  It sounds like you're confusing the two.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/closures-dev/attachments/20100105/d97a5332/attachment-0001.html 


More information about the closures-dev mailing list