9fans archive / 2000 / 08 / 19 /    prev next

From: Ralph Corderoy <ralph@inp...>
Subject: Re: [9fans] Installing the updates
Date: Tue, 1 Aug 2000 14:31:24 GMT

Hi,

> rob pike wrote:
> > Seriously, we deliberately refused to buy into that multiple
> > inclusion dance, which is a hideous non-solution for the problem of
> > undefined dependency order on #includes.  Why not use the occasion
> > to clean up the code so you only include <stdio.h> once?
> 
> ...
> 
> Many developers take the approach that each interface header should
> be self-contained, so that the user of the header doesn't need to
> know anything about the details of the implementation of that header.
> Information hiding, you know.

I think he's heard the argument but doesn't agree.

    "Simple rule: include files should never include include files."
        -- http://www.lysator.liu.se/c/pikestyle.html

It's well worth a read if you haven't already.

(The document is a sane view in a profession contorted by ridculous
company coding standards that forbid short variable names and insist on
`add 1 to the object's reference counter' comments.  Normally also the
place where code reviews are a farce where everyone tries to detect a
couple of spelling errors, even the same spelling errors as everyone
else, so they can show they studied the code.)


Ralph.