4 ms·
Go’s error handling is not noise, it’s signal.
by thiht 3y ago
Go’s error handling is not noise, it’s signal.
- maleldil 3y agoIt's signal in a sea of noise. The premise (errors as values) is done better and more concisely by languages like Rust, Haskell and Ocaml with ADTs.
- masklinn 3y ago> Go’s error handling is not noise, it’s signal. It's a ridiculously noisy signal, which makes it difficult to distinguish from noise: because all the error handling looks the same and is extremely verbose, it's difficult to distinguish special cases you need to pay attention to. Tons of languages have "errors as values", Go stands out in its verbosity, as well as its lack of safety / certainty.
- thiht 3y agoOf course Results/Options would have been better from the start, but it’s too late for that. As a dev though I infinitely prefer Go’s error handling than exceptions for instance, specifically because of the verbosity and explicitness