gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Header cleanliness [was: removing the 'makeinstall'-->'makeall' depe


From: Nicola Pero
Subject: Re: Header cleanliness [was: removing the 'makeinstall'-->'makeall' dependency]
Date: Thu, 19 Dec 2002 16:12:47 +0000 (GMT)

> > ... that would be really cool, and possibly, finally, cut down the
> > measurable build overhead generated by including almost any AppKit/*.h
> > under GNUstep (because almost in all cases, this ends up including the
> > front-end/back-end optimized interface which is a lot of inline functions,
> > and takes quite some time to compile).
> 
> For this (and a few other reasons), I've been thinking about writing up
> a proposed addition to the GNUstep coding standards. I haven't written
> it properly yet, but in short, I'd like to codify this (for public
> headers):
> 
> * A header must be self-contained.

Yes.


> * A header should include as few other headers as possible. Use @class
> instead.

Yes.


I mean, very good habits ... at least for the core libraries. :-)

Very good habits ... hmmm .... maybe not for all.  If you are not worried
about compilation speed but need to cut down development time, or if you
have precompiled framework/library headers, for example, you may just want
to do

#include <Foundation/Foundation.h>
#include <AppKit/AppKit.h>

this definitely doesn't follow your rules :-) it compiles slowly on
GNUstep, yet it can be acceptable if you don't care about compilation
speed.

If we get precompiled headers on GNU, that might become the preferred
solution even to cut down compilation time, because usually you will have
a precompiled version of Foundation/Foundation.h and of AppKit/AppKit.h,
while you will not have precompiled versions of the specific Foundation/*,
AppKit/* headers if you include them separately.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]