4 ms·
> Go error handling is not to be taken lightly The fact that Go relies on return codes instead of exceptions to express errors is what will fundamentally limit
by laureny 14y ago
> Go error handling is not to be taken lightly
The fact that Go relies on return codes instead of exceptions to express errors is what will fundamentally limit the language's adoption, in my opinion.
Anyone who was writing code in the 80's and 90's remembers how fragile and buggy software written this way is (Windows' HRESULT, anyone?). Exceptions have considerably increased the robustness and reliability of millions of lines of code, the software community is not going back to error codes.
- Evbn 14y agoGo doesn't rely on return codes. Go has multiple return, and has error objects. Microsoft and Google eschew exceptions, because they cause huge invisible problems in large systems.