Coverity tool

Justin Johansson no at spam.com
Wed Feb 10 05:39:46 PST 2010


Walter Bright wrote:
> bearophile wrote:
>> But there are many C++ programmers that don't use exceptions, for
>> example they are not allowed in Google C++ code: 
>> http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Exceptions
>>  So surely not 100% of D code will use exceptions. That's why I have
>> said that D avoids some of those problems but not all them :-)
> 
> I don't know why Google proscribes exceptions, but exceptions still have 
> an uneasy relationship with C++. Older compilers may not support them 
> properly, much C++ code uses them incorrectly and inconsistently, there 
> isn't good support for exception safety or transaction safety, being 
> able to throw value types is a big mistake, etc.

If C++ exceptions are thrown and caught within, and are completely self-
-contained within, a (C++) library then nobody should be the wiser.

The only possible issue can be about whether the library should
be allowed to propagate exceptions across the API boundary and
into client code.

The pro and con arguments should take the client code interaction /
API context into consideration.  Otherwise it's just a blatant,
ill-considered consideration (ill-pun considered as well).

Cheers

Justin Johansson





More information about the Digitalmars-d mailing list