3 ms·
The pattern is the programmer's choice. Here's a contrary example/approach: https://blog.golang.org/errors-are-values https://blog.golang.org/errors-are-values
by m_sahaf 8y ago
The pattern is the programmer's choice. Here's a contrary example/approach:
https://blog.golang.org/errors-are-values https://blog.golang.org/errors-are-values
- pmarreck 8y agoClaiming "errors are values" is as useless as claiming anything in computing is "a value" (because it is). Errors are not just values, however, they're something much more specific: An uncaught error is a specific circumstance where the programmer's mental model was insufficient to account for all the state possibilities. Literally the introduction of the unexpected. And this should be treated as a very bad (or at least a very special) thing, as soon as possible. Hence, runtime exceptions. (Hence, disclaimer alert, I'm not a fan of Go.)