4 ms·
I refuse to see where the difference to exception handling is. My exceptions bubble up to my "sad path" handler.
by _pmf_ 8y ago
I refuse to see where the difference to exception handling is. My exceptions bubble up to my "sad path" handler.
- Smaug123 8y agoYour phrasing ("I refuse to see…") makes me very apprehensive of trying to explain, but I'll bite. Using exceptions is dealing with errors out-of-band. Using Result types is dealing with errors in-band. In-band is somewhat less flexible because you don't have the power to arbitrarily alter the execution flow of your program. Out-of-band is much easier to reason about by that very token.