|
|
|
|
|
by jpc0
878 days ago
|
|
> C’mon, that’s basically the same thing I'm not going to talk about errorOr specifically because I don't know how it's implemented but rather your premise. Exceptions are the modern goto, the try catch may be in the caller function. Or it could be 3 inherented classes away (this is hyperbole, I'm not sure if it would actually work) with so much indirection it would be impossible to follow the code flow other than to step in a debugger. So in fact it's worse than a goto since at least a goto had a label. I'm not for or against exceptions just pointing out that a result or optional type is in no way at all similar to an exception. On another point C++ exceptions are notoriously inefficient as well. There ware valid reasons to want to be exception free even from a code style perspective. |
|