Treatment of nested 'break'
guy.steele at oracle.com
Thu May 10 19:48:08 UTC 2018
> On May 10, 2018, at 3:57 PM, Kevin Bourrillion <kevinb at google.com> wrote:
> I'm just going to say that naming a keyword as the argument of another keyword seems novel and unprecedented for Java, and as such I think should require pretty strong justification.
I concur. Note that “case x, default ->” has the same property: it causes the `default` keyword to be an “argument” of the `case` keyword. I kind of lean against doing such things.
However, if we are going to explore that part of the design space, I just wanted to point out that “return switch a;” has at least one advantage relative to “break switch a;”.
More information about the amber-spec-experts