brian.goetz at oracle.com
Fri Feb 1 19:41:32 UTC 2019
> It seems we’re all in favor of break-with over unadorned “break”?
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.
- 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.)
- `break-to` as a synonym for labeled break.
- `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.)
Overall I don’t find any of these terribly compelling, but perhaps this may jog some actually-good ideas.
More information about the amber-spec-observers