kdelibs coding style

Kevin Krammer kevin.krammer at gmx.at
Sun Jul 23 13:09:11 BST 2006


On Saturday 22 July 2006 19:46, Thiago Macieira wrote:
> Charles Samuels wrote:
> >Thiago Macieira wrote, on Saturday 2006 July 22 9:44 am:
> >>  He's prepared to open a precedent
> >> to changing the policy whenever people don't like it.
> >
> >Uh.. that sounds a pretty reasonable precedent to me.
> >
> >Kleag makes a very reasonable suggestion as well.
>
> To tell you the truth, there are two things I would change in the
> proposal. One would be that. And I do find that a line with the brace
> helps readability a lot -- especially in long ifs.

Good point. With 4 space indentation the if's body ends up at the same 
horizontal position as the multi line conditional.
I think that's basically the only reason I prefer braces in their own lines 
for my own coding style.

> The other would be the 
> indentation of "case" in switches.

I don't like this one either. It will be the only block that is not indented 
and if you have blocks in the cases you end up with more than closing brace 
on the same column
exmaple:
switch (foo) {

case 0: {
}

}

Cheers,
Kevin

-- 
Kevin Krammer <kevin.krammer at gmx.at>
Qt/KDE Developer, Debian User
Moderator: www.mrunix.de (German), www.qtcentre.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060723/b1ce7cb2/attachment.sig>


More information about the kde-core-devel mailing list