[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Header cleanliness
From: |
Markus Hitter |
Subject: |
Re: Header cleanliness |
Date: |
Thu, 2 Jan 2003 15:15:30 +0100 |
Am Donnerstag, 02.01.03 um 12:24 Uhr schrieb Alexander Malmberg:
I wanted to get some feedback on the idea first, especially the "each
file includes it's header before _any_ other headers part", since it
involves changing a lot of existing files. Didn't get much feedback on
that part, though, so maybe everyone thought it was ok.
Look like a good rule of thumb for me, too. Especially, as you can
avoid including headers in the source again which you already had in
the corresponding header. This double inclusion in source/header pairs
should be avoided, IMHO.
- How to distinguish between a compiler supporting precompiled
headers, if at all?
I'd prefer "not at all" (imho, it should be completely transparent),
but I guess that might not always be possible.
Of course, both versions should produce the exact same result. But
possibly, the precompiled header machanism is faster when including
more/more complex headers.
Perhaps you've seen my attempt to measure the difference. But after
sending the message, I've found a fault in my setup. New measurements
to follow soon.
... I think having strict rules is overkill :).
Of course. This text should be considered as a guideline only.
To make it easier to see if a particular header is included, I tend to
bunch headers from one library together (sometimes alphabetically to
make searching even easier), often in the order: [corresponding
header, then ]system, Foundation/*, AppKit/*, other libraries,
project. That's mostly personal opinion, though. :)
Matches mine :-)
Gruss,
Markus
- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/