On Nov 17, 7:08 am, Ian Collins <ian-n...@hotmail.com> wrote:
krel wrote:
I've seen it mentioned in several places that some code
bases - open source projects or proprietary company code -
deliberately choose not use exceptions in their C++ code.
The only example I can come up with at the moment is are
the Google C++ guidelines however, I've seen that notions
expressed in various places.
What are some reason that a project would choose not to
use C++ exceptions?
Lack off, or poor compiler support.
Today? Except possibly for very small embedded systems.
Fear, uncertainy and doubt about compiler support, maybe,
but exceptions are probably more stable than templates or
RTTI today.
Interoperatability with C would seem to me to be a more
significant reason. If an entire project is written in C++,
I don't see any real problem, but if you have C++ functions
called from C, and vice versa, you might want to pay
attention.
It would also be interesting to know just what role these
guidelines play within Google. They don't seem very
appropriate; several of them actually violate best
established Any complex initialization should go in an
explicit Init() method. practice ("Any complex
initialization should go in an explicit Init() method", for
example). Google certainly has some exceptionally competent
C++ programmers, but they don't seem to have been involved
here.
proper support for exceptions. That's their main reason for