Am 01.06.2016 um 15:15 schrieb Sergio Martins:
On Wednesday, 1 June 2016 14:41:30 WEST 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 , but it looks butt -ugly and it is in violation of http (http://wiki.qt.io/Qt_Coding_Style#Line_breaks 2nd item: "Commas go at the _end_ of wrapped lines")I think that refers to function calls and wasn't written with ctor init-lists in mind, but we can improve it so it stops being a violation. Subjective reasons against leading commas: - It's ugly Subjective reasons against trailling commas: - It's ugly Objective reasons in favor of leading commas: - You get 1 line diffs - You can comment it out by commenting only 1 line - Code generators / tooling only have to touch 1 line to add or remove
Not mentioned yet: Conditional compilation vs. stable ABI:
MamanBar::MamanBar(...)
: m_field1(...),
m_field2(...), // oh...
#ifdef FEATURE1_ENABLED
m_field3(...), // ...ah
#endif
#ifdef FEATURE2_ENABLED
m_field4(...)
#endif
{
}
Ciao,
Mathias
--
Mathias Hasselmann | [email protected] | Software Engineer
KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt Experts
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
