Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys/sys
On Sun, Jan 04, 2004 at 12:32:26AM -0500, Steven J. Dovich wrote:
> Hubert Feyrer wrote:
> > On Sun, 4 Jan 2004, Matthias Scheler wrote:
> > > Because it is broken by design if a header file doesn't include header
> > > files it requires itself. And because this is a regression. The
> > > application
> >
> > I'm with Matthias on this issue - IMHO every header should pull in all the
> > things it needs.
>
> And that coddles the lazy at the expense of compile time. Consider
> the lexing costs for all the redundant including of required headers
> which have already been included. That can amount to a measurable
> difference in compile time, particularly when extended across the
> entire NetBSD source tree.
>
> If it is known what the dependency requirements are, or it can be
> understood with a little bit of investigation, then we ought to
> expect that those who profess to be competent at system programming
> should be able to get this right. Even if headers do not do all the
> work for them. The NetBSD community is competent enough to handle
> the extra effort.
>
> I really understand the convenience and sympathize with the desire,
> but I am too aware of the costs involved. Sorry.
>From the point of view of a programmer, even if gcc *does* (which, further
down this thread, I am given to understand it does) skip including the
same thing twice if it's in an #ifndef that GCC recognizes, it is simply
*not difficult at all* to include the right things (and only the right
things) when writing something in C.
I'd rather have my compile of whatever program I'm writing fail because I
forgot to #include something than have it take 20 minutes because I included
one thing that included 300 others. That way I know I forgot to include
something and I'm not building the program with everything but kitchensink.h
(forgive the pun, it's early ;)
-Sean
--
/~\ The ASCII
\ / Ribbon Campaign Sean Davis
X Against HTML aka dive
/ \ Email!
Home |
Main Index |
Thread Index |
Old Index