4 ms·
> How are you thinking of solving this with generics? People can now create Try or Option monads instead of returning the error. This was the one of the reaso
by mohanmcgeek 5y ago
> How are you thinking of solving this with generics?
People can now create Try or Option monads instead of returning the error.
This was the one of the reasons anti generics people were anti generics
- mseepgood 5y agoBut that will make error handling more verbose.
- stouset 5y agoSpeaking as a user of languages that have exactly this, it can’t possibly be any worse than the situation in Go right now.
- mseepgood 5y agoOther languages have an additional zoo of language syntax besides generics to make monadic error handling bearable, which Go doesn't have.
- EdwardDiego 5y agoWill it? I can't see it myself, but happy to educate myself.
- mohanmcgeek 5y agoIt'll make it unmanageable by hiding complexity. But more verbose? I'm not so sure.
- mseepgood 5y agoPassing a single anonymous function is already more characters to type than if err != nil {}.