"case catch" instead of "case throws"?
Holo The Sage Wolf
holo3146 at gmail.com
Mon Feb 19 14:43:01 UTC 2024
The branch catches a case of throws
On Mon, 19 Feb 2024, 16:18 Patrick Doyle, <p.r.doyle at gmail.com> wrote:
> In Brian's "Uniform handling of failure in switch", he proposes the syntax
> "case throws". I see the motivation (it certainly reads nicely) but since
> such clauses are catching exceptions, wouldn't it be more in line with the
> rest of the language to use "case catch"?
>
> This would also serve to preserve the word "throws" for its usual purpose
> if ever "switch ... throws" becomes a thing.
>
> --
> Patrick Doyle
> p.r.doyle at gmail.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-dev/attachments/20240219/534199e1/attachment.htm>
More information about the amber-dev
mailing list