Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2008-08-27 15:27:05


on Wed Aug 27 2008, "Peter Dimov" <pdimov-AT-pdimov.com> wrote:

> David Abrahams:
>> on Wed Aug 27 2008, "Robert Ramey" <ramey-AT-rrsd.com> wrote:
>>
>>> David Abrahams wrote:
>>>> on Tue Aug 26 2008, "Robert Ramey" <ramey-AT-rrsd.com> wrote:
>>>
>>>> If you know of cases where people broke backward compatibility in ways
>>>> that were irresponsible, it would be good to hear about those. And it
>>>> wouldn't hurt for Boost to have a guidelines page on how to manage
>>>> interface evolution. I might just write one.
>>>
>>> I'm referring specificly to the episode regarding boost exception
>>> where by the purpose of boost::throw exception was changed
>>> from a limited, lightweight piece of code crafted to address the
>>> simple problem that some compilers don't implement "throw"
>>> to a heavy weight (includes a bunch of new headers) module
>>> whose purpose is totally inpenetrable and adds RTTI requirement
>>> to any library which used boost::throw exception.
>>
>> This does look like a problem to me.
>>
>> Hmm, I can't find any discussion on the list in which Peter Dimov, who
>> was the author of throw_exception, participated. Did Emil get Peter's
>> approval for this change?
>
> Yes, I did approve this change.

In private only? I ask because I would have been interested in reading
your rationale about it.

> Do note that the problem with throw_exception now requiring RTTI was
> not pointed out by anyone prior to release, and it was some of our
> users who discovered it, after 1.36 has been finalized.
>
> As a response to this issue, I requested a new macro, BOOST_NO_RTTI,
> be added to Boost.Config, and John has kindly done that. I expect Emil
> to modify Boost.Exception to honor BOOST_NO_RTTI as soon as possible.

So IIUC, your intention was never to require RTTI in throw_exception,
and Emil didn't know that, so he violated your original intent
unwittingly. What about the "weight" of the header and its
dependencies? Your usual stance is to avoid such things.

If we want throw_exception to work when there's no RTTI, we should try
to somehow test it. We could do that by adding <cxxflags> for known
popular compilers to turn it off for one test.

> Since we are now officially not doing point releases, the earlier this
> can be fixed is in 1.37, so it is not fair to accuse Emil of being
> unresponsive about it. (Hotfixes notwithstanding.)
>
>> Well, I really hope I'm missing something, but from the evidence I see
>> before me, this was at least not handled well. We have a Boost-wide
>> convention that libraries wanting to report errors on compilers with no
>> exceptions support use boost::throw_exception. The change of
>> boost::throw_exception essentially made a Boost-wide policy decision
>> that such libraries, when they *do* throw, will integrate the
>> Boost.Exception machinery. That shouldn't have happened without a
>> broader discussion.
>
> So why didn't people discuss it then?
>
> http://lists.boost.org/Archives/boost/2008/02/133425.php
>
> "Let's discuss this issue before I submit the Boost Exception source
> code to SVN."
>
> http://lists.boost.org/Archives/boost/2008/04/136828.php

I can only speak for myself, but neither message's subject line alerted
me to the fact that the change would represent a Boost-wide change of
policy.

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk