Re:New in Go 1.20: wrapping multiple errors
by kaba0 on Sunday December 11, 2022 @04:17PM
(#33947626)
It’s not explicit error returns any more than C code with all those larger than 0 checks. You will leave it out or get angry at the line noise and will miss(handle) an important error case and will have a bad program and you won’t know about that until it’s too late.
A loud exception is way better.
Re:New in Go 1.20: wrapping multiple errors
by metaltyphoon on Sunday December 11, 2022 @12:07PM
(#33944991)
But thats the programmer’s fault. You shouldn’t use exceptions for flow control.
Re:New in Go 1.20: wrapping multiple errors
by leetrout on Sunday December 11, 2022 @12:33PM
(#33945269)
To an extent, sure, and that can apply arbitrarily to lots of things.
The Python community, by and large, embraces "easier to ask forgiveness than permission" and some features in the standard library use exceptions for their flow control. It's much more likely to run into overuse of exceptions in Python than not.
I much prefer the explicit error returns instead of exceptions being used for flow control.