6 ms·
From my reading, they wanted it to match the sort of grammar that type constructor/type cases have. (looks like a declaration) I have not read the mailing list
by extraduder_ire 3y ago
From my reading, they wanted it to match the sort of grammar that type constructor/type cases have. (looks like a declaration) I have not read the mailing list discussion to see what other alternatives were suggested.
My kneejerk reaction would be to prefer something like "threw" in place of "throws", but I'm sure there's a reason not to.
- lolinder 3y ago> 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).