Boost logo

Boost :

Subject: Re: [boost] 5 Observations - My experience with the boost libraries
From: Stefan Seefeld (seefeld_at_[hidden])
Date: 2010-03-24 08:38:04

On 03/24/2010 08:25 AM, Stewart, Robert wrote:
> Tom Brinkman wrote:
>>> 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.
> My point was that it is very hard to avoid exceptions in C++. Two-phase construction is untenable for the same reasons that C APIs are a pain to use: you have to remember to check the error state(s). Without two-phase construction, you have to decrease performance by checking object validity in every member function or else throw an exception to indicate improper construction. Exceptions look pretty good in that light.

Very true.

>> In any event, my point is that c++ exception handeling should
>> be optional. Boost libraries need to be updated to reflect this.
> I already agreed that more could be done in that direction and suggested that you should try to push those ideas into the existing and future libraries.

I strongly disagree on this. Wasn't one perceived drawback of Boost its
use of macros ? The main reason for the use of macros seems to me to be
to work around deficient compilers, i.e. portability. If you really want
to promote the idea of making standard C++ features optional, you are
getting even more macros and convoluted logic to satisfy all those
different needs.

I don't think Boost needs more variability and flexibility. I'd actually
favor cleaning it up by removing support for obsolete platforms and tools.


       ...ich hab' noch einen Koffer in Berlin...

Boost list run by bdawes at, gregod at, cpdaniel at, john at