[Development] commas in ctor-init-lists
Allan Sandfeld Jensen
kde at carewolf.com
Fri Jun 3 02:02:55 CEST 2016
On Wednesday 01 June 2016, Marc Mutz wrote:
> Hi,
>
> There seems to have been a silent underground move to uglify the Qt sources
> , by using commas to introduce lines
> . I have no idea where this came from
>
I am probably one of those introducing it since it comes from WebKit coding
style. Sorry, I also think it is kind of ugly, but it is very structurally
clean and in some circumstances I prefer it due to that.
Note there is a related coding style violation for if statements.
if (blabla
|| lala
|| justDoIt) {
doIt();
}
This has the same benefits for diffs as the leading comma, though I mainly use
it to avoid the sub-expressions of the if statements to indent the same as
statements inside the if-block. This helps again make the code faster and
easier to read at glance, though it violates Qt coding style.
`Allan
More information about the Development
mailing list