This post is a little bit more philosophical.
I was thinking about the fact that there’s no consensus about exceptions and whether to include them or not in a programming language. Think about Go. They decided to not add support for exceptions. Did they cite any study to support this decision, that supports the notion that exceptions in general lower the quality[1] of the ecosystem? Not that I know of. Now OCaml goes in the opposite direction - adding more ways to jump around in the code, with effects. Also no studies, no experiments. Correct me if I’m wrong.
So what are the possible interpretations of this situation?
-
To include exceptions or not in a programming language has no effect whatsoever on the quality of the code (or very low effect). Hence there will never be consensus about it.
-
To include exceptions in a programming language does affect quality, but there’s no scientific or logical way to find out which alternative is correct; it’s impossible to prove.
-
To include exceptions does affect quality, but no one has yet figured out a way to prove it, either with empirical evidence or logic.
-
To include exceptions does affect quality, but we’re not interested in finding out, for whatever reason. That is, we’re not rational, but rather tribal or inconsistent; to include exceptions in a programming language would have the same logical validity as having a favorite color.
The underlying assumption here is that if we are rational, and something is possible to prove, then there would be near consensus about a topic.
We all know there’s a great deal of “alchemy” rather than “chemistry” in software engineering still. People online appeal to authority more often than to logic or empiricism.
So what can we do about this? Do you agree with my assumptions? Why or why not? What does it mean to a field to accept that we’re not being rational?
[1] With “quality” we often mean something like “correct, mostly bug free code that’s easy to read, change and maintain”. I don’t think there’s an accepted way to measure this objectively still, though it’s often easy to agree on some basic “red flags” of low quality code.