
Error Handling in C++: Why You Should Use Eithers, Not Exceptions or Error-Codes - adgasf
https://hackernoon.com/error-handling-in-c-or-why-you-should-use-eithers-in-favor-of-exceptions-and-error-codes-f0640912eb45
======
shakna
This 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)

------
uwu
shouldn't an optimization like this be performed by compilers?

