Boost logo

Boost :

From: Rob Stewart (stewart_at_[hidden])
Date: 2002-08-27 15:53:40

From: "Eric Woodruff" <Eric.Woodruff_at_[hidden]>
> In any example, so complex as that, certainly the interface of Location
> would not expose the fact that its implementation depends on road segments.
> Any pure OO concept generally has to have the separation between interface
> and implementation.
> Co-dependent headers means you have a bad design. Period. (I'm not saying
> that there are NEVER situations where one might have codependent in lowlevel
> headers of some framework, but it is rare, and a comment is necessary to
> explain why that lowlevel header had to violate idealism.)

I quite disagree with your unequivocal declaration. Real life
sometimes rears its head and requires that you forgo OO purity,
particularly when the alternative involves more expensive
approaches. For example, using the Pimple idiom is a great way
to avoid such dependencies in headers, but it carries runtime
costs that may not be acceptable in a given domain or

One can say that one should avoid cross-header dependencies, but
one cannot be so dogmatic as to say that failure to avoid them
means, by definition, the design is wrong. Clearly, in a
particular domain, one may have the luxury of stating that they
must be avoided, but that doesn't generalize to the entire C++
programming community.

Rob Stewart                           stewart_at_[hidden]
Software Engineer           
Susquehanna International Group, LLP  using std::disclaimer;

Boost list run by bdawes at, gregod at, cpdaniel at, john at