3 ms·
> - Forces you to consider error handling If you use the result. Its easy to overlook that some more procedural functions might return only an optional err val
by Macha 5y ago
> - Forces you to consider error handling
If you use the result. Its easy to overlook that some more procedural functions might return only an optional err value.
See also stuff like append sometimes mutates and returns a reference to a slice with the same backing array, and sometimes returns a slice with a different backing array. Nothing going to remind you you forgot to copy before returning.
- llimllib 5y agofor sure, I've been bitten by that as well. I really wish it were required to handle the err value.