|
|
|
|
|
by preseinger
1517 days ago
|
|
Error handling is basically orthogonal to performance. If a function call can fail, it should return an error, and that error should be managed by its caller. Any other approach means callstacks are unpredictable, which makes a program way way harder to model. |
|
Objectively false. Correct answer: the error should be managed by the code that makes sense to handle the error.
> Any other approach means callstacks are unpredictable
Also false. I use conditions regularly, and my callstacks are very predictable - errors bubble upward through the call tree until they're handled. There's nothing simpler.
> which makes a program way way harder to model
Also false. I have no problem at all modeling and understanding my code rife with conditions.