Exceptions Considered Harmful or: throw is just goto in drag

The two pillars of modern software design are objects and exceptions. Objects allow us to partition very large systems into smaller, comprehensible chunks, and exceptions keep them running smoothly, by protecting them against malfunctions.

Funny thing is: though modern software is huge in comparison to the old-fashioned variety, it doesn’t seem any more reliable. Even though everybody knows that exceptions make programs better, I’ve never yet seen any real evidence that shows any reason even to suspect that it’s true. In point of fact, I don’t believe it, and I rather suspect that in most cases, exceptions make matters worse. Continue reading