From: Edward Diener (eldiener_at_[hidden])
Date: 2007-04-03 18:31:22
Jeff Garland wrote:
> Sohail Somani wrote:
>> Oh come on guys, aren't we just getting silly? To avoid what? Adding cpp
>> files to the build?
> Yeah, actually. Here's a response to your earlier mail:
> Sohail Somani wrote:
> >> This is a non-issue. With header-only libraries, step 1 is
> >> the only thing that disappears and you might even be lucky
> >> enough to disable language extensions in your project.
> I assure you, given the number of posts on this list and the -user list,
> building boost is something people have issues with. I've had to answer the
> 'link errors' question many times for date-time -- even though this is basic
> knowledge that all developers should have, and it's "all in the docs".
I fully agree with you that building Boost has been somewhat of a
headache in the past but without knowing the Build system's version 2 I
am hoping this would improve on 1.34 and up. Maybe that is because I
would like to believe that understanding bjam in V2 will be easier than
for V1, or that the docuentation for doing so will be better, and
therefore fixing any problems locally might be easier.
I think that the general reason for putting code in a library rather
than a header file has not been touched upon, and that is that header
files will have inline code as opposed to a library. For template
programmers this is normal because of the way that templates are largely
used in C++, which is from header files where the declarations and
definitions all reside. For non-template programming, or even some
template programming where a good deal of code may be outside of
template definitions, using library with the header files is more of a
standard, at least for people who have been trained that way.
It is quite possible that inline code is not an issue and that the
tradeoff of greater size for the slightly faster speed of inline code in
these days of multi-gigabyte computer memory is not that important
anymore. But I know that I was trained to consider large amounts of
inline code to be bad as opposed to a reusable library, and it is hard
to break old habits. But I do understand that templates are a different
case in C++ and largely require a different model.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk