Rename try/except to try/catch
While working on #1424 I realized that only Python calls the clause to catch exceptions except; it's catch in all other languages.
I feel catch is slightly better because it's a bit clearer what happens when it's omitted (which is still going to be legal in try { ... } finally { ... }): if there is no catch, the exception is not caught.
As with all breaking changes, this will be done in 3 steps:
- Elvish 0.18.0 will support both, while deprecating
except. - Elvish 0.19.0 will drop support for
except.
it's catch in all other languages.
That's also been my experience. While I love Python its use of except rather than catch has always slightly annoyed me. I appreciate the impetus for making that choice from among the reasonable keywords since it obviously maps "exception(s)" => "except". But you don't "except an exception" you "catch an exception". 😄
This is now done with the removal of support for except.