[Dune] redundant includes in headers

Jö Fahlke jorrit at jorrit.de
Fri Aug 19 17:48:25 CEST 2011


Am Fri, 19. Aug 2011, 17:05:47 +0200 schrieb Oleh Krehel:
> I agree that it's a headache to fix this problem, but it will only
> grow larger and larger in time. Hopefully it will not become unmanageable.

Now you've completely turned around what I said:

 1. I completely disagree in labelling the current situation "a problem".

 2. Only if we do as you say will we actually _create_ a problem.

> As for <fmatrix.hh>, you've misunderstood me:
> It includes:
> 
> > #include <cmath>
> > #include <cstddef>
> ...
> then
> > #include <dune/common/fvector.hh>
> which itself includes
> > #include <cmath>
> > #include <cstddef>.
> This means that at least the two includes can be safely removed from fmatrix.hh.

Well, I understand it exactly the same way this time.  I agree with you in so
far that we could remove these to includes from fmatrix.hh, and as long as the
implementation details of fvector.hh don't change then anything using
fmatrix.hh will continue working correctly.

I probably should emphasize the "as long as the implementation details of
fvector.hh don't change" part once more.  You really don't want to rely on
implementation details if you can reasonably avoid it.

In my previous mail I gave an example what the negative consequences of
relying on implementation details can be.  Go read it (again).

Bye,
Jö.

-- 
In the beginning the Universe was created.  This has made a lot of
people very angry and been widely regarded as a bad move.
-- Douglas Adams
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: Digital signature
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20110819/4c54ee0c/attachment.sig>


More information about the Dune mailing list