Skip to content

Comment on Should Go 2.0 support generics?parent

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.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.