Boost logo

Boost :

Subject: Re: [boost] [threads] making parts of Boost.Threads header-only
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2009-04-08 13:37:28


On Wed, Apr 8, 2009 at 2:34 AM, Anthony Williams <anthony.ajw_at_[hidden]> wrote:
> Emil Dotchevski <emildotchevski_at_[hidden]> writes:
>
>> By the way, Boost is way past that point, so a good argument against
>> my position is that one more header-only lib isn't going to make
>> things (much) worse. :)
>
> And in this case, boost::mutex is mostly header-only already, so it's
> only a few empty inline functions for the exceptions that will be
> moving.

Yes, that was my point, but I still wouldn't do it. An empty
non-inline function can be very useful debugging tool. For example,
defining a non-inline constructor for an exception type allows you to
temporarily modify the constructor to print diagnostic information
whenever someone throws that exception -- at the cost of re-compiling
a single cpp file. For very large projects this can be an incredible
win.

Of course, this is just an example, my general stance is that you
can't predict all the benefits of minimizing code in header files
(which is the most important tool for keeping physical coupling under
control.)

Emil Dotchevski
Reverge Studios, Inc.
http://www.revergestudios.com/reblog/index.php?n=ReCode


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