4 ms·
> This is checked exceptions all over again... That is an interesting topic, as I went through the cycle of adding and removing them, they always felt like the
by rileymat2 4y ago
> This is checked exceptions all over again...
That is an interesting topic, as I went through the cycle of adding and removing them, they always felt like the right thing, but they felt like "work". They make coding less fun, having to think through failure conditions, like you say, you don't care about.
I guess the answer is really there is no one sized fits all solution, we have some applications where the correct solution is to crash, we have other applications that can't crash under any condition. You just need to know where you are.
Edit:
Also, out of the box C++ checked exceptions implemented terribly.
http://www.gotw.ca/publications/mill22.htm http://www.gotw.ca/publications/mill22.htm
The (Mis)understanding section describes it pretty well.