News for hackers. Stuff that matters.
Re:Errors are values by curun1r on Tuesday January 13, 2015 @02:08AM (#8878547)
Go's error handling is only a problem because of other missing features...algebraic types and/or generics. With either of those features, you could implement two-track, functional composition with a single bind method. That would go a long way towards only having to write your "if err != nil" once rather than once per function invocation.

Alas, the lack of those other features leads to articles like this one that offer unnatural ways of avoiding something that is pretty much idiomatic in the language.

There are no comments on this comment yet.