3 ms·
That's a matter of opinion. Many, me included, very much like the current, very explicit, approach. I understand why people who like monadic constructs don't l
by cube2222 4y ago
That's a matter of opinion. Many, me included, very much like the current, very explicit, approach.
I understand why people who like monadic constructs don't like it though.
- kaba0 4y agoI don’t know — I don’t claim that algebraic datatypes are the only proper way to handle errors, I’m okay with exceptions as well (even checked ones). But what go has is only very slightly better than C’s attempt, so I’m not sure it is that subjective.
- cube2222 4y agoI think the presence of multiple return values and the ability to easily use complex types for errors make a huge difference (adding wrapping messages, context, etc.). I agree algebraic data types could improve this. I don't think monadic result types or exceptions would be an improvement.
- seer-zig 4y agoNot quite: https://www.uber.com/blog/data-race-patterns-in-go/ https://www.uber.com/blog/data-race-patterns-in-go/