Subject: Re: [boost] Library dependencies and intrer-library code reuse
From: John Phillips (phillips_at_[hidden])
Date: 2010-03-27 00:26:00
Peter Dimov wrote:
> Steven Watanabe:
>> David Abrahams wrote:
>>> Every dependency should be an
>>> informed and conscious decision on the part of a library developer.
>> Humph. It's not as though #includes mysteriously appear
>> in your code when you're looking the other way.
> They do, as part of bug fixes made by others and as indirect
> dependencies. This goes unnoticed because the test infrastructure always
> has the whole of Boost available. One needs to actively fight
> dependencies, or they do creep in.
They also do thanks to bad coding choices. I just had a job applicant
doing a coding test today who opened his source file with a couple of
dozen lines of includes and defines that he referred to as his "standard
header" that he uses for everything. Unfortunately, only about 3 lines
of it had anything to do with the coding problem he was supposed to be
One more way is by removing dependencies in the code. If a change or
improvement eliminates the existing references to a header that lead to
it being included, it is not always easy to know that and remove the
include directive. Especially if this removal happens incrementally over
a few changes.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk