kdelibs coding style

Leo Savernik l.savernik at aon.at
Sun Jul 23 20:14:49 BST 2006


Am Donnerstag, 1. Januar 1970 01:00 schrieb Zack Rusin:
> If it's stupid but works, it isn't stupid.

I'd like to emphasise some issue of pragmatism that I feel hasn't been 
mentioned explicitly enough:

Totally leaving aside the discussion whether the proposed rules make sense, 
most people usually adhere to rules when they exist. However, many don't 
fancy remembering rules which may make them violate the rules 
*inadvertantly*. 

As KDE has a spirit of encouraging adherence to rules by technical means, 
like, e. g., the default action collection makes your menus automatically 
adhere to the HIG without forcing the developer to think about it explicitly, 
KDE should also do so for the kdelibs coding style.

A big relief would be, as already mentioned in this thread, a properly set 
up .kateconfig-file (and similary for other flavors of editors) defining 
*all* otherwise disputable settings (e. g. indentation, tab spacing). The 
mere existence of this file allowed a developer using e. g. Kate to 
concentrate on coding immediately without having to keep indentation rules in 
mind (and probably remembering to configure them explicitly for kde, and them 
maybe switch back to another style for another project).

I mentioned .kateproject because it is already possible today. But it hasn't 
to stop here. If other technical means become available to aid proper 
application of the kde coding style but doesn't impose any burden onto the 
developer, it should also be deployed.

The tremendous advantage for long time core hackers as well as occasional 
contributors is that the amount of explicit thinking about policies is 
minimised, the amount of getting one's work done is maximised. Also, the 
developer gains confidence the more he can rely on predefined settings and 
the less he has to recall rules.

It's probably neither feasible nor sensible to impose total technical coverage 
of encouraging the coding style, but we should aim towards it.

Summarizing, making adherence to the coding style by technical means a 
no-brainer for developers will raise its application to source code and also 
not inflict additional burden onto developers.

mfg
	Leo




More information about the kde-core-devel mailing list