Re:JEP draft: Exception handling in switch
by lolinder on Friday April 19, 2024 @03:42PM
(#40091185)
> I'm sure there's a reason not to
Language designers try to avoid adding new keywords if at all possible, especially ones that are short and common. Doing so requires either breaking thousands of projects and APIs or adding a bunch of complexity to the grammar and syntax highlighting tooling (so threw is only a keyword in some contexts but not others).
My kneejerk reaction would be to prefer something like "threw" in place of "throws", but I'm sure there's a reason not to.