[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Consensus on the kdelibs coding style
From:       Andreas Hartmetz <ahartmetz () gmail ! com>
Date:       2008-07-08 20:31:50
Message-ID: 200807082231.50348.ahartmetz () gmail ! com
[Download RAW message or body]



On Sunday 06 July 2008 15:38:08 Kelly Miller wrote:
> On July 5, 2008 9:41:23 am Lubos Lunak wrote:
> > - "4 spaces, no tabs" - this appears to be the most used style in
> > kdelibs, and other options don't seem to have big advantages
>
> Can someone explain to me what's so evil about tabs?  Personally, I hate
> stumbling across spaced code indents, because they're horribly inflexible,
> can't be resized at all, and require the programmer in question to remember
> to hit the space key X times for an indent.

The reason seems to be that editors suck at dealing with tabs.
Tabs only work correctly if you use them like

TAB if (reallyLongConditionAndStuff &&
TAB     thatOtherCondition) {
TAB TAB doSomething();
TAB TAB doSomethingElse();
TAB }

and some very well-known editors don't do that correctly out of the box. They 
also don't show a visual difference between tabs and spaces so you are 
screwed.
Kate does not have such problems and I like tabs. I do not use them in kdelibs 
however and I have untabified some code of mine, too.

Executive summary: Nice idea that doesn't work with existing tools.
[As opposed to "evil right from the start" :)]
-- 
Ooooh scary. How about "King o' the spoiled potato salad?"
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic