3 ms·
Error Handling in C++: Why You Should Use Eithers, Not Exceptions or Error-Codes
- uwu 9y agoshouldn't an optimization like this be performed by compilers?
- shakna 9y agoThis has come up before [0], quite recently, though not this particular article. Some of the points that stood out to me, in opposition of the article's "this way is better": * Exceptions are usually free if not thrown... If they are thrown... You're in an error path. You don't usually care about speed. There's a long list of problems here [1]. [0] https://news.ycombinator.com/item?id=14316539 https://news.ycombinator.com/item?id=14316539 [1] https://news.ycombinator.com/item?id=14321083 https://news.ycombinator.com/item?id=14321083