3 ms·
Nothing you wrote is specific to golang's error handling though, and in actuality, ends up being more brittle because it is possible to miss handling such error
by za3faran 3y ago
Nothing you wrote is specific to golang's error handling though, and in actuality, ends up being more brittle because it is possible to miss handling such errors. At least an exception would bubble up instead of keeping the program running in an undefined state.
- preseinger 3y agoit is my very clear experience that rust programs are more brittle than go programs, precisely because rust makes it possible (even encourages) error "bubbling" via `?` in practice, go code bases that are subject to even minimal code review have basically no ignored errors
- lanstin 3y agoyeah my linters won't allow it. and bubbling up is exactly what you dont want for robust code. the UX is different for a failure on rereading a config file when you already have a good config vs. on startup. go code tends to be robust because the authors of the code and the community are the sort that worry about each err value, like Linux and like Python and like C itself.