
On Wed, Apr 8, 2009 at 2:34 AM, Anthony Williams <anthony.ajw@gmail.com> wrote:
Emil Dotchevski <emildotchevski@gmail.com> 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