Boost logo

Boost Users :

From: David Abrahams (dave_at_[hidden])
Date: 2006-08-20 22:55:40


Jeff Garland <jeff_at_[hidden]> writes:

> Robert Ramey wrote:
>> David Abrahams wrote:
>>> Jeff Garland <jeff_at_[hidden]> writes:
>>>
>>>>> This is one reason that the serialization library has no such
>>>>> "comprehensive" header defined. The other reason is that
>>>>> it's not clear how much such a header might include - all
>>>>> possible archives? all stl serialization. etc. Finally, at
>>>>> least in the serialization library, the mere inclusion of
>>>>> a header can result in the instantiation of code which
>>>>> is never called - thereby adding to code bloat.
>>>> I think a few years ago I would have agreed with this, but I think
>>>> the "size" issues just don't apply that much on modern machines.
>>> In general, Jeff, I agree with you, but in this case I have to agree
>>> with Robert. Because of the way the serialization library is
>>> constructed, including another archive can really result in the
>>> generation of substantial code. It's not just "size" but actual size.
>
> Sure, but that's optimization. There's learning how to write a
> serialization program and then there's learning how to writing an
> optimized serialization program.

Agreed. I was only responding to your statement that

   "size" issues just don't apply that much on modern machines

In this case they do.

It's often appropriate to provide comprehensive headers, but that does
eventually break down when libraries become really large (e.g. MPL) or
have unusual characteristics (e.g. serialization). It's not a
foregone conclusion that in the serialization case, we'd be doing
beginners any favors in the long run by providing the comprehensive
header.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net