Result Codes Make Me Want to Throw

April 9, 2020   Martin Jones
Picking a side in the exception war.

I’m happy (possibly too happy) with a phrase I came up with a year or so ago about C++ exceptions: “result codes make me want to throw”.

Yes, I definitely favour the use of exceptions. I’ll teach as many ways as a language realistically allows for error handling, but exceptions were designed for this purpose, and remain the better choice.

Rather than go through the reasons, I just thought I’d push my phrase out onto the interwebs and see if it possibly makes someone else smile.

That’s all.