5 ms·
Having a common idiom for common operations like error propagation is not "absurd and eyebrow-raising". What sounds absurd to me is obscuring the actually inte
by ColonelPhantom 3y ago
Having a common idiom for common operations like error propagation is not "absurd and eyebrow-raising".
What sounds absurd to me is obscuring the actually interesting control flow significantly in favor of either showing the trivial control flow or alleviating the need to learn the one (1) single operator that represents said trivial control flow.
- omginternets 3y agoYes, but we do have a common idiom for error-propagation in Go. It's more explicit than the proposed alternative, in fact.
- lmm 3y agoYou don't have an idiom, you write it out longhand every time, which ends up obscuring the important control flow and business logic under a pile of ceremonial repetition.
- omginternets 3y ago"if err != nil {...}" is the idiom, my friend.