kdelibs coding style

Remi Villatel maxilys at tele2.fr
Sun Jul 23 04:23:37 BST 2006


Hi there,

I'm not a big contributor, I only filed one patch (but I intend to 
contribute more). I've been lurking on the list for only a week and I 
really enjoy this passionate debate. (Who said "Holy war"?)  ;-)

Here is the opinion of a newbie contributor --for what it's worth: To 
have a coding style is a good idea but one has to respect his own rules 
before to impose them to others.

I wandered a lot --and I mean it-- in the kdelibs while I was writing my 
style and found various indentation patterns. IMHO, if we want some 
consistency, we can't avoid re-indenting/re-formating everything in one 
go. This is quite a drastic measure but after that, it will be more 
legitimate to demand to respect whatever rule. Otherwise it sounds like 
"Do what I say, not what I do".

And I think we could use a psychologist to write these so-called coding 
style rules. Dealing with our hypertrophied egos of developers is quite 
a delicate job. ;-)

When I see somebody coming to tell me how to code, I slam the door shut 
--metaphorically. It would be better to present this as a question of 
layout. These rules shouldn't say more than we, contributors, must apply 
them to our contributions --not to our code itself-- and that we would 
be rejected otherwise. (By the way, is this last measure planned?)

With the help of Artistic Style (http://astyle.sourceforge.net/) that 
Guillaume Laurent mentioned and an appropriate configuration file 
included with the "layout rules", that should help everybody to swallow 
the bitter potion.

By the way, nobody asked me but I vote for the opened brace on a new 
line. It's easier to read and maintain, IMO. And I don't like the 
"sometimes yes, sometimes no" approach of Qt coding style rules. Whatever...

Resistance is futile, as they say.  ;-)

-- 
==================
Remi Villatel
maxilys_ at _tele2.fr
==================




More information about the kde-core-devel mailing list