2 ms·
Well, that's what I mean. You could sorta do it in Java, but people don't do it that way because there aren't consistent conventions and it feels wrong. But add
by skybrian 8y ago
Well, that's what I mean. You could sorta do it in Java, but people don't do it that way because there aren't consistent conventions and it feels wrong. But adding the extra type information exposes internal details and results in a backward-incompatible API change if you ever want to start throwing a new exception.
Some people extend RuntimeException instead, which means you don't know whether a generic RuntimeException is recoverable or not.
It's similar to how code formatting tools have been around a long time, but Go made their formatter standard, and that made all the difference. Conventions sometimes matter more than language features.