Sujet : Re: Which code style do you prefer the most?
De : bc (at) *nospam* freeuk.com (bart)
Groupes : comp.lang.cDate : 28. Feb 2025, 15:22:05
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vpsgqc$3mr9v$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14
User-Agent : Mozilla Thunderbird
On 28/02/2025 10:19, Richard Heathfield wrote:
On 28/02/2025 09:21, Janis Papanagnou wrote:
On 28.02.2025 09:55, Richard Heathfield wrote:
<snip>
>
On the other hand, I maxed out at 24.
>
It would be interesting to get to know what sort of code-lines
or what sort of code-structure these extreme values stem from.
I thought so too, so I looked, and of course it's not as interesting as we might have hoped.
I'm not allowed to post the code here, but I can paraphrase:
value = really_quite_extremely_long_function_name(arg1,
arg2,
arg3,
arg4);
<sigh>
I think I'd go with this:
value = really_quite_extremely_long_function_name(
arg1,
arg2,
arg3,
arg4);
Since the args would then also line up with a similar call but where the function name is a different length:
value2 = a_somewhat_shorter_function_name(
arg1,
arg2,
arg3,
arg4);
That's assuming it is still not viable to have them all on the same line.