Subject: Re: [boost] 5 Observations - My experience with the boost libraries
From: Tom Brinkman (reportbase2007_at_[hidden])
Date: 2010-03-28 21:58:02
>> Exceptions are an all or nothing thing.
Yeah, maybe true. Sad, because, that's one of the most cited reason
for "C" inclined developers to dismiss "C++" libraries. When you work
with mixed teams of C/C++ guys, they argue about this all the time.
I'm not sure there is an elegant solution to this dilemma either.
On Sun, Mar 28, 2010 at 5:08 PM, Mathias Gaunard
> Tom Brinkman a écrit :
>>> The prevailing view on projects that I have worked on is that
>>> C++ exception handling should optional and not required.
>>>> Exceptions are a fact of C++ life. You can't avoid them if for no other
>> reason than std::bad_alloc, unless you don't allocate from the free store.
>> Not true, there are no-throw versions of std::new.
>> In any event, my point is that c++ exception handeling should be optional.
>> Boost libraries need to be updated to reflect this.
> The C++ standard library throws exceptions. You probably use it, as a lot of
> other C++ developers do, while claiming things like containers of types that
> don't throw exceptions don't throw exceptions, but yes, they do (since they
> call operator new, which throws, and have no other way of reporting errors
> How can you expect Boost to be any different than the standard library? Even
> Qt recently left no-exception-make-believe-land when they realized it hurt
> them more than they anticipated, and now they have to reaudit everything to
> ensure exception-safety, because the code was never written with that in
> Exceptions are an all or nothing thing. You can't just make them optional or
> be exception-agnostic.
> In all cases, all C++ code should be exception safe, unless you choose to
> restrict yourself to a dialect of C++ where exceptions do not exist, that is
> say C.
> Unsubscribe & other changes:
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk