This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Projects for beginners




On Thu, 1 Feb 2001, James Dennett wrote:

> Richard Kenner wrote:
> >
> >     NO!!!  I remember well the days of unguarded headers.  They are not
> >     completely dead yet, but I still hope for their final demise.  I do
> >     not ever want to _have_ to know that header a can be included only
> >     after header b.  Programming is complicated enough without just that
> >     much more clutter.  NO, NO and NO AGAIN!
> >
> > If the structure of the headers is so complicated, it needs to be
> > simplified. The perceived need to put in "guards" is merely a symptom
> > that things have gotten too complicated.  They should be made simpler,
> > not patched over by adding the clutter of guards.
>
> I've been trying to resist, but I'll join in.
>
> Richard's comments are, IMO, wrong.  The reason is that we should
> be able to include any header "x.h" without having to know about
> which headers it needs;


This is my only reason for using them. As I said, it was very frustrating
to try to start the new register allocator code, and i couldn't even get
functions i wanted without trying to hunt down what things from 8 other
files i never cared about i had to include first.
--Dan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]