Exceptions are values in C++, Java, and Python too. They're just values you throw. You can program these values.
As usual, I find that opposition to exceptions is rooted in a misunderstanding of what exceptions really are
As usual, I find that opposition to exceptions is rooted in a misunderstanding of what exceptions really are
Perhaps this also might be clearer: the fuss is not about the errors themselves being values, but about the entire error handling system being just values.
With exceptions they are thrown and end up somewhere else in a catch block, so the path of the success value is now distinct from the path of the error value.