tab stop size -- isn't it time to finish up the discussion once and for all? :)

Kuba Ober kuba at mareimbrium.org
Tue Jul 25 22:34:52 BST 2006


Over time, the whole pointless indentation discussion is repeated over and 
over on various OSS project mailing lists. I'm guilty as charged to 
contributing sometimes to the same :(

Every single time I've seen it, it leads to no clear decisions nor plans, and 
always results in some schorched earth. Any exceptions only prove the general 
rule ;)

I'd say that there are some things where having the freedom ultimately leads 
to waste of time. Indentation is one of them. Developers starting new KDE 
projects are dismissed with "in your own project you choose", which really 
doesn't help much. People working on various parts of KDE (I'm sure there are 
some!) have to constantly switch their indentation styles I guess . . .

I don't think there would be anything wrong if an indentation of Qt (or say 
kdelibs, if it's different) was chosen as the "holy and only one" and then 
got automatically applied, at a chosen date, to entire KDE 4 codebase.

I guess that uncrustify would need to get whatever bug fixes/enhancements it 
needs, and then be used to run through the sources. It would also need to be 
automatically applied to all commits, so that the indentation would be 
maintained for ever after.

I did that recently on a bunch of aegis-managed projects at work and things 
are so much better for that.

Otherwise I'm betting that this subject will be rehashed over and over, 
without anything ever getting fixed.

If many people think that Qt's (or say kdelibs) indentation style is not good 
enough, then the only sane alternative from my viewpoint is to make a 
weighted random choice. I can set up a tiny website where people will be able 
to cast a vote for any indentation style they choose from a fixed list 
decided upon beforehand. Afterwards, a random choice would be made, with 
probabilities proportional to the number of votes each style got.

In light of everyone having strong biases one way or the other about style 
issues, that's the only rational way to choose the style (to me) . . . I.e. 
for the chance to decide, as we people probably won't ever be able to . . .

I'm not out to incite a war, I'm just trying to find a reasonable solution. If 
all fails, blame the RNG ;)

Cheers, Kuba




More information about the kde-core-devel mailing list