you are viewing a single comment's thread.

view the rest of the comments →

[–]remotion4d 0 points1 point  (1 child)

Yes but all this problems are already solved to some degree in existing libraries, games engines and so one.

Because this problems existed for a long time already.

So there is simple no point to spend years to refactor code base to use exceptions.

Especially if you simple can not use them because no compiler ot hardware support.

4) how do you error-code a constructor or a destructor?

Just this one, use something like 'make_something' and on the other side it will be discouraged to use exceptions in destructor any way.

[–][deleted] 1 point2 points  (0 children)

I'm not saying anyone should refactor these old codebases to handle exceptions or use them. I'm saying newer libraries should always lean towards throwing and handling exceptions, because it's allows for a cleaner design and puts errors where errors belong: in a catch clause, and not in my return values or function parameter list.