2 ms·
As others mentioned, Google’s C++’s guide is simply not that relevant. And don’t forget the principle use case of C++ - it is a low level language. While excep
by kaba0 5y ago
As others mentioned, Google’s C++’s guide is simply not that relevant.
And don’t forget the principle use case of C++ - it is a low level language. While exceptions are pretty cheap overall, they can be expensive in some niche cases which do happen more often in C++ than in python.
I really haven’t heard a good case against exceptions per se — they make it possible to handle every error at an appropriate place. And bubbling the error up to possibly a much higher place is exactly the needed approach many times (e.g. returning a http error code on an unrecoverable mistake)