Header files (Re: A little review of kdecore & kdeui)

R.F. Pels ruurd at tiscali.nl
Sat Apr 8 13:54:56 BST 2006


On Saturday 8 April 2006 14.26, Cornelius Schumacher wrote:

> > From my own real-world experience: every piece of software I ported from
> > Windows to Linux did have incorrect includes, the developers just don't
> > care about the case. Having one *simple* rule helps in this regard.
>
> I can't imagine a more simple rule than "The include is exactly the same as
> the class name".

Or source name == header name == class name all lowercase.

> If under Windoes a wrong case is not an error, there always will be wrong
> includes when porting to Linux regardless of the convention. But as Thiago
> pointed out this is trivial to fix.

I'll throw in another argument. Yes, it's simple to apply that rule as long as 
you're dealing with the source. That is, if you have a more or less direct 
hint for correctly casing the name. It gets difficult as soon as this is 
going to mean that:

- the .cpp source is NOT following the same rule, and
- if one needs to hand-edit for example build files referencing
  the names from memory.

The point here is that it is easier to remember a classname than remembering a 
classname including the currect casing. 

-- 
R.F. Pels,  3e Rompert 118,  5233 AL  's-Hertogenbosch,  The Netherlands
+31736414590        ruurd at tiscali.nl       http://home.tiscali.nl/~ruurd





More information about the kde-core-devel mailing list