kdelibs coding style
Aaron J. Seigo
aseigo at kde.org
Thu Jul 20 19:44:04 BST 2006
On Thursday 20 July 2006 10:29, David Jarvie wrote:
> On Saturday 2 January 2006 3:43, Zack Rusin wrote:
> >With much love from Russia comes temperature checker (prediction: it's
> >hot! flaming hot!) in the form of a proposal for a common coding style
> >in kdelibs.
>
> Most of it (apart from the 'Q' and 'q' prefixes which obviously don't
> apply to KDE) makes sense - my only objection is the braces style - IMHO
> an opening brace on a new line is much clearer than putting it at the end
> of a line.
while several of us agree with that (including myself) it was also agreed that
this is largely an issue of personal aesthetics; there are people who like
the brace on the same line and have reasons for that.
if we try and make a little adjustment here and a little adjustment there
we'll just end up bikeshedding on the issue and we'll never get a common
style. so we've taken the style used in Qt and adopted that verbatim[1] so as
to avoid all that. ergo:
> [...] it represents a compromise for many of us who have already expressed
> our support for it in Trysil, so we understand and note that this is not "my
> preference over yours"
the point is to get consistency with reasonable readability, emphasis on
consistency. did i mention consistency is the primary goal? ;)
[1] we did make one adjustment, which is to say that even single line
conditionals require braces, but that's only because it has led to subtle
bugs in the past. even the trolls in attendance when we first discussed this
agreed with that point ;)
--
Aaron J. Seigo
Undulate Your Wantonness
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43
Full time KDE developer sponsored by Trolltech (http://www.trolltech.com)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060720/09a1acac/attachment.sig>
More information about the kde-core-devel
mailing list