With generics, it would be possible to write a library implementing 2-track, functional error handling, which would allow for a form of automatic error propagation. The if err != nil statements would be kept to a minimum. It's precisely the lack of generics in the first place that makes error handling in Go so obnoxious.
Comments
With generics, it would be possible to write a library implementing 2-track, functional error handling, which would allow for a form of automatic error propagation. The if err != nil statements would be kept to a minimum. It's precisely the lack of generics in the first place that makes error handling in Go so obnoxious.