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

John Rose john.r.rose at oracle.com
Fri Mar 23 20:33:09 UTC 2018


On Mar 23, 2018, at 1:20 PM, John Rose <john.r.rose at oracle.com> wrote:
> 
> I think mandating "break (e)" is a lighter
> weight solution, even though it has some of the
> #{ Stand Out }# smell.
> 
> — John

P.S. And to be clear, I'm simply pointing out surprising consequences
of your design, to elucidate its trade-offs.  I won't be too disappointed
if we go with the odd new contextual restriction on "break-l", since
"break-l" is a marginal feature only seldom used.  It can be relegated
to a helper method as a last resort.  But, again, mandating a helper
method to get out of a tight spot can be a design smell.

Whatever we decide, let's document the consequences on coders
as best as we can.

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


More information about the amber-spec-experts mailing list