[Development] commas in ctor-init-lists

André Somers andre at familiesomers.nl
Fri Jun 3 14:26:03 CEST 2016



Op 03/06/2016 om 13:53 schreef Marc Mutz:
> On Friday 03 June 2016 10:05:52 Edward Welbourne wrote:
>>    if (somee.really(long.and.complicated, expression) || another.such(that,
>> makes, the.line.too.long) || and.then.some.more())
> To be perfectly blunt: such expressions shouldn't be allowed. Period. Neither
> with nor without line breaks. Such monsters should be subjected to Extract
> Method with extreme prejudice.
>
> Thanks,
> Marc
>
Fine. Lets replace it with something like this then:

if (theValue == 
MyNameSpace::MyLongAndComplicatedClassName::MyClassEnum::TheValue1 || 
theValue == 
MyNameSpace::MyLongAndComplicatedClassName::MyClassEnum::TheValue2 || 
theValue == 
MyNameSpace::MyLongAndComplicatedClassName::MyClassEnum::TheValue3) {

}

André



More information about the Development mailing list