On Thu, Jan 29, 2015 at 11:27 AM, Andrew Stitcher <[email protected]> wrote: > > The current best practice in C (and C++) is for a header file (and a > source file too) to include any header that defines a type that the file > directly depends on (irrespective of any transitive includes).
> This makes the file robust against any change of transitive includes because the dependencies of its dependencies change. > At the obviously quite tremendous risk of speaking from too little experience with C projects, this seems too simple. *If you don't control the header dependencies of a third party project*, I agree it makes sense to code defensively. But if it's inside your own source project, those redundant includes aren't really defending you against anything. (Though the import model is of course quite different, this same issue comes up in python projects.)
