4 ms·
"no exceptions" is one of the best parts of Google style guide, IMO. Note that, banning of exceptions introduced returning status (error codes done right). It m
by mrazomor 4y ago
"no exceptions" is one of the best parts of Google style guide, IMO. Note that, banning of exceptions introduced returning status (error codes done right). It makes it easier to follow the code and makes the code more readable (but, you need a few macros, unfortunately).
- hi_herbert 4y ago
- ncmncm 4y agoOK if you like 10-15% performance loss off the top. And incompatibility with the rest of the world.
- int_19h 4y agoIn a language like C++ returning status codes means that callers can and will ignore it, even when they shouldn't.
- zetafunction 4y agoSince C++17, using [[nodiscard]] can help with that.
- jandrewrogers 4y agoIndeed, Google's implementation of Status/StatusOr requires explicit handling of those objects, they cannot be discarded automatically.