"case catch" instead of "case throws"?

Patrick Doyle p.r.doyle at gmail.com
Mon Feb 19 14:18:20 UTC 2024


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/42979f98/attachment.htm>


More information about the amber-dev mailing list