Call for bikeshed -- break replacement in expression switch

John Rose john.r.rose at oracle.com
Fri May 17 06:41:20 UTC 2019


(Going back to the start of this thread.)

On May 12, 2019, at 12:38 PM, Brian Goetz <brian.goetz at oracle.com> wrote:
> 
> We could surely take “break-with” and move on; it feels sufficiently “switchy”.

If "break L" breaks out of a statement introduced with "L"…

Then…

"break ->" could break out of a statement introduced with "->".

So, consider this a plea for that bikeshed color.  It's better
than "break-with" because instead of "if" there's a little
arrow in there.  See, you're breaking from the arrow!?!

STARTER -> {
  stuff;
  if (early)  break -> 42;
  stuff;
  stuff;
  break -> -1;
}

(The ECL "true => 42" is then in Java "if (true)  break -> 42;")



More information about the amber-spec-experts mailing list