4 ms·
Did Java for many years. Their exceptions were a good next step when compared to C++, but there are many problems. For example, InterruptedException. It real
by tomohawk 8y ago
Did Java for many years. Their exceptions were a good next step when compared to C++, but there are many problems. For example, InterruptedException. It really should be a runtime exception, except that it is checked. I've very rarely seen code that handles this exception properly, and quite often seen it buried, causing all kinds of mischief at runtime.
Since Java, did Ruby (several years ago). It was a revelation that using essentially runtime exceptions was not as big a cluster as Java community at the time thought it would be. Convinced me that if you're going to have exceptions, they should be runtime exceptions.
Since then, been doing golang and really liking it. The verbose error handling is sometimes tedious, but is the least evil way of handling things that I've worked with. Our experience has been that the quality of code improves when error handling is tied in with the code flow instead of dealt with as a separate path.