Go's Error Handling: Why Explicit Beats Exceptions (According to Google)
Go's Error Handling: Why Explicit Beats Exceptions (According to Google)
What no programming language seems to do is to enable any kind of post-hoc error handling. The "user" sees the error and is confused, so the runtime should include some basic mechanism for them to inspect and take action. Perhaps one could write a mechanism for Throwables to look up an error recovery service (maybe with JSPI) as a minimal prototype, although such would be useful to few.
I always wish articles on exceptions would address Java's two branches of the Throwable type hierarchy, Exceptions and Errors. Errors should not be caught (including AssertionErrors, @jetbrains 👀) but rather should kill the whole system, maybe the whole process. This makes Java good for encapsulating systems, because the container can handle Errors. If the module author doesn't abuse the Error subtypes 👀