Re:I want off Mr. Golang’s Wild Ride (2020)
by lanstin on Saturday April 30, 2022 @03:09PM
(#31218386)
The value here is the few seconds of human attention given to the error at hand. The thought is irreplaceable. Like others mention, 90% of the, end up if err != nil { return nil, err } but thinking about it will, in my experience, make the system more robust to failure. At the very Least for your process you will decide on a goal of carrying on in the face of failures and repairing when things work again vs. just bailing out and letting something else worry about it.
[ Parent
| on HN ]
Re:I want off Mr. Golang’s Wild Ride (2020)
by kaba0 on Saturday April 30, 2022 @04:46PM
(#31219160)
What if the return nil, err was the sane choice at the time of writing but there are changes downstream that mandate a new error handling mode there? Also, there are plenty of “writing this code at 3AM” where I would question the validity of such thoughts.