5 ms·
More than just that, Result in general also prevents from accessing the value when there is an error and accessing an error when there is a value.
by dureuill 2y ago
More than just that, Result in general also prevents from accessing the value when there is an error and accessing an error when there is a value.
- throw-the-towel 2y agoThe absence of that safeguard in Go is a feature. It's used when the error isn't that critical and the program can merrily continue with the default value. Of course, this is also scarily non-explicit.