3 ms·
> Then we got multi-return error objects, maybes, panics [...] that fail to understand the basic premises of errors: > Any error system that relies upon develo
by infensus 6y ago
> Then we got multi-return error objects, maybes, panics [...] that fail to understand the basic premises of errors:
> Any error system that relies upon developer discipline will fail because errors will be missed.
> Any error system that handles all errors the same way will fail because there are some errors we can ignore, and some errors we must not ignore.
Not sure how that's true for Rust. Functions that can fail, return a Result, that contains either a value or an error. If you want to use the value, you have to either explicitly check which one is it (you can handle or ignore the error at this point), or quickly access it by unwrapping the Result, which will crash (panic) the program on error.