<div dir="ltr"><div dir="ltr">On Fri, Feb 1, 2019 at 2:41 PM Brian Goetz <<a href="mailto:brian.goetz@oracle.com">brian.goetz@oracle.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
> It seems we’re all in favor of break-with over unadorned “break� <br>
<br>
Just for the record, there are possibly-complementary options in this direction. This is not a proposal, as much as putting them on the record.<br>
<br>
 - Allow `break-with` as a synonym for `return` in lambdas. Using `return` was an uncomfortable choice (but this may well be locking the barn after the horse escapes.)<br></blockquote><div><br></div><div>I don't think I agree that there is any problem with `return`. Lambdas ended up extremely similar to "concise anonymous classes (that downplay identity)". Users are generally well-served to think of them that way. It seems to me that any alternative to `return` could only confuse matters.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
 - `break-to` as a synonym for labeled break. <br></blockquote><div><br></div><div>Hmm. Presumably `break` would never be "deprecated", and permanent synonyms like this are undesirable. But this does read nicely and I don't hate it.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
 - `break-from for | while | do` as a synonym for “break from the innermost control construct of this kind†(as an alternative to creating a label.) <br></blockquote><div><br></div><div>I don't hate this either. If we want the feature then this would be a good name for it. And you may remember our data does actually show that it's not too rare for the loop types to be different in this way. But this feature would create a bit of perverse incentive to take two nested loop headers that might have very parallel structure and arbitrarily write them differently (for vs. while) just to avoid the ugly label.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Overall I don’t find any of these terribly compelling, but perhaps this may jog some actually-good ideas. <br></blockquote><div><br></div><div>Same.</div><div> </div></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div style="line-height:1.5em;padding-top:10px;margin-top:10px;color:rgb(85,85,85);font-family:sans-serif"><span style="border-width:2px 0px 0px;border-style:solid;border-color:rgb(213,15,37);padding-top:2px;margin-top:2px">Kevin Bourrillion |</span><span style="border-width:2px 0px 0px;border-style:solid;border-color:rgb(51,105,232);padding-top:2px;margin-top:2px"> Java Librarian |</span><span style="border-width:2px 0px 0px;border-style:solid;border-color:rgb(0,153,57);padding-top:2px;margin-top:2px"> Google, Inc. |</span><span style="border-width:2px 0px 0px;border-style:solid;border-color:rgb(238,178,17);padding-top:2px;margin-top:2px"> <a href="mailto:kevinb@google.com" target="_blank">kevinb@google.com</a></span></div></div></div></div></div></div></div></div>