4 ms·
Secondary return values. It works by being explicit about code paths and error contexts. You lose some convenience and should design simpler, more straight-forw
by loopz 7y ago
Secondary return values. It works by being explicit about code paths and error contexts. You lose some convenience and should design simpler, more straight-forward code structure.
- erik_seaberg 7y agoExceptions make f(g(), h()) straightforward. All the alternatives are much harder to read.
- loopz 7y agoGolang level is a tad below functional style or business rules.
- notacoward 7y agoIt's only straightforward if you omit the error handlers (which is misleading) or don't handle errors anywhere (which is sloppy). Maybe it works for some kinds of programming, but for any kind of systems code it's a pretty strong smell.