Disallowing break label (and continue label) inside an expression switch

John Rose john.r.rose at oracle.com
Wed Mar 28 23:38:30 UTC 2018


On Mar 28, 2018, at 4:13 PM, Dan Smith <daniel.smith at oracle.com> wrote:
> 
>> On Mar 23, 2018, at 1:41 PM, Brian Goetz <brian.goetz at oracle.com <mailto:brian.goetz at oracle.com>> wrote:
>> 
>> I prefer the simplicity that "all expressions either complete normally or complete abruptly with cause exception."
> 
> Just want to emphasize that this is a really important property of the language, and of what we mean when we call some things "statements" and other things "expressions".
> 
> A good overview here:
> 
> https://docs.oracle.com/javase/specs/jls/se10/html/jls-14.html#jls-14.1 <https://docs.oracle.com/javase/specs/jls/se10/html/jls-14.html#jls-14.1>
> 
> Of course, we can change these definitions. But introducing expressions that can complete abruptly for control flow reasons is a significantly more disruptive change than your typical "add a new kind of expression" feature.

+100

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/amber-spec-experts/attachments/20180328/9b46f7a2/attachment.html>


More information about the amber-spec-experts mailing list