Hey Nexus,
thanks for the feedback.
Saying error codes should be completely avoided is a bit too strict
Indeed it's very strict. I tend to follow my own guidelines in every possible situation without exceptions. It's true that using error codes is still widely done, even by the STL, but I don't agree to the idea (reasons in the article). There are for sure situations where an error code might feel easier to use or more straightforward, but I still want to stick to my guidelines to be consistent.
I would probably also mention the term "runtime error" here, since it is very common and differentiates the type of error from the language feature exception.
I thought about that for a long time but came to the conclusion that "runtime error" is too squishy. Even a programming error is evaluated during runtime.
For me "exception" and "programming error" are in the same category, just like "runtime error" and "compile-time error".
Do you mean "compilers" instead of "languages"?
Thanks, that's right. I will correct it.
You should catch exceptions by reference.
That's also right, typo will be fixed.
looks like code from beginners who don't know how boolean expressions work
Haha.
Yes, it's my personal style. I like the verbosity and am used to it from unit testing, where you often exchange true/false in the expressions.