2 ms·
Handling errors as values is indeed nice. While exceptions can be convenient in some cases, I find that the out-of-band control flow is over-complicated and mor
by nicoburns 6y ago
Handling errors as values is indeed nice. While exceptions can be convenient in some cases, I find that the out-of-band control flow is over-complicated and more of than not leads to poorly documented error paths that are treated as an afterthought.
Where Go's error handling falls down is that it still doesn't force you to handle the errors. Result sum types like Rust and Swift so much better than anything else that I've used that I actually think that other languages (including Go, but also Java/C#/JavaScript/etc) ought to consider adding the feature and making it idiomatic.