Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
dureuill
· 2y ago · 0 comments
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.
Comments
[–]
throw-the-towel
2y ago
The 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.