kdelibs coding style
Ingo Klöcker
kloecker at kde.org
Sun Jul 23 11:25:24 BST 2006
On Sunday 23 July 2006 10:59, mETz wrote:
> Btw, I did not hear any argument _against_ having curly braces on a
> line of their own yet except for "but we don't want to change this
> style, either all or nothing"... ;)
A possible argument against this is that with having curly braces not on
a line of their own the code is more compact vertically which means
less vertical screen estate is "wasted" and you can see a bit more code
without scrolling, e.g. compare
if ( a < b ) {
do something
...
} else {
do something else
...
}
with
if ( a < b )
{
do something
...
}
else
{
do something else
...
}
Moreover, curly braces on a line of their own do in fact distract me
more than they help me, but that's probably just because most of the
code I usually look at doesn't put them on a line of their own.
Regards,
Ingo
-------------- 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/a94b971d/attachment.sig>
More information about the kde-core-devel
mailing list