3 ms·
As another commenter mentioned, do you really think about them, or just tell yourself that you think about them while writing the same boilerplate millions of t
by kaba0 4y ago
As another commenter mentioned, do you really think about them, or just tell yourself that you think about them while writing the same boilerplate millions of times?
- topspin 4y agoIndeed. Also, this notion that Go makes one think about all the errors is false. What happens to the errors from all the "defer foo.CloseOrMaybeFailSomehow()" that get run on early return? Answer: they're ignored. Ignoring errors baked right in. Yes, you can handle them with a closure, but I can count on part of one hand the number of times I've actually seen that. And I know why: because at some point the regression gets unreasonable and people just pretend they didn't see it and thank their makers the compiler lets them get away with it, this blog post in question being a fine example of that. So I know what sort of malarkey I'm reading when this "think about the errors" gets bandied about.