Hello folks,

It is just a naive discussion about coding style... =D

According to the CodingStyle.txt:

*"- in a C++ constructor initialization list, the colon is on the same line
and*
*  continuation lines are aligned as the rule above:*

* ClassName::ClassName() : x(1), y(2),*
* z(3)*
* {*
* }"*

As you know, most of the classes does not follow this rule yet, but it's
fine, since it looks like a new rule =D

However, in this format, the next lines would usually require some white
spaces (in order to do a correct alignment), but it might not be a good
idea, because the alignment would depends on the editor...
In addition, writing many (more than one) members at the same line is less
readable than writing only one...

My suggestion is that for this case, we should have a style in which we
would never need to use white spaces...
for example:
*ClassName::ClassName() :*
*x(1),*
*y(2),*
*z(3)*
*{*
*}*

*or*

*ClassName::ClassName()*
* : **x(1),*
*y(2),*
*z(3)*
*{*
*}*

But that's just my two cents.

What do you think?

All the best,
Marcos
_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to