by mopsy · 8y ago · 0 comments
One of the reason is that you don't always want to check the error. The most common one is fmt.Println.
I would not like to always write
_, _ = fmt.Println("Hello, playground")
This is why you want unchecked errors to implicitly bubble up. Which is what exceptions give you, or perhaps a syntax with implicit error return values rather than Go's by-convention approach.
And if it means a lot in this case, wrap the function and use it instead.