Not horrible imo. But I've found that verbose error handling and explicit errors made me consider which parts of the code can return err, and reorganize code around that - with that I've been able to eliminate most 'err' from my codebase.
Like, if you go by function: ReadData(has err)-> ParseData(has err) -> ProcessData(no err)
Instead of having functions that can fail dynamically all over your codebase.
Comments
First, this is legal:
Not horrible imo. But I've found that verbose error handling and explicit errors made me consider which parts of the code can return err, and reorganize code around that - with that I've been able to eliminate most 'err' from my codebase.Like, if you go by function: ReadData(has err)-> ParseData(has err) -> ProcessData(no err)
Instead of having functions that can fail dynamically all over your codebase.