3 ms·
Yes, Go requires explicit error propagation, but this is desirable because 1) errors are no different than other values so they don’t get special flow control a
by weberc2 8y ago
Yes, Go requires explicit error propagation, but this is desirable because 1) errors are no different than other values so they don’t get special flow control and 2) people are much more likely to properly handle errors if they have to think about handling in every call frame (I.e., error handling bugs are much rarer in Go than Python or JS or etc).
- _ZeD_ 8y ago>>> (I.e., error handling bugs are much rarer in Go than Python or JS or etc). [citation needed]
- weberc2 8y agoI've been writing Python extensively for 10 years and Go for 6. Recently, I've been the exceptions cop in our Python/JS shop, and every week I see errors in prod that would almost certainly not exist in Go code (both because Go is statically typed but also because Go developers check their errors). Take this anecdote for whatever it's worth to you.