I agree it’s be nice to be able to return error + zero values in a simpler way.
Personally I think they should add a keyword like returnif or check to do this, as sometimes (maybe half the time?) you don’t need to decorate an error if you want to handle it higher up. So you could just do:
returnif err
I hate the guard proposal as it mixes up error handling and function calls, but it’d be nice to have a simpler less verbose way to return errors.
In comparison with languages throwing exceptions though, Go is far far easier to reason about, even if more verbose.