K
Keith Thompson
[...]Ben Bacarisse said:This is unarguably a down side. How bad it is, though, is debatable.
When moving code between systems like this, something has to change
and if the library author has re-organised the code for the new port
then they will also have documented the new required includes (if they
are using Pike's rule).
That last "if" is, I think, another big problem with Pike's rule.
I suspect it's impractical to follow it unless *all* the code in the
project does so. In practice, most programmers (including library
developers) don't follow Pike's rule. If you try to follow it
yourself, you're going to end up with a mixture of headers that
#include everthing they need and headers that don't #include
anything.
It also depends on header authors to document exactly what other
headers the client needs.