David Abrahams wrote:
Jeff Garland
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.
Actually, the serialization is an unusual example in this regard so maybe its not the best example for discussion. But using this logic, wouldn't we want to have a header stl.hpp which includes all the stl libraries or all the stream libraries. Again, where is the line drawn when deciding wath to collect. Regardless of what boost does there are always gong to be a lot of headers which don't fit in some group. Finally, there is a big issue for. If I inherit a piece of code and for some reason I need to investigate how it works, I now have to go through a lot more code to decide what is relevant. I don't like that. Smaller programs are better programs, and "comprehensive" headers make programs bigger while making them look smaller. I especially don't like this. Robert Ramey