Sujet : Re: Which code style do you prefer the most?
De : 643-408-1753 (at) *nospam* kylheku.com (Kaz Kylheku)
Groupes : comp.lang.cDate : 28. Feb 2025, 19:53:59
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20250228104742.343@kylheku.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14
User-Agent : slrn/pre1.0.4-9 (Linux)
On 2025-02-28, Richard Heathfield <
rjh@cpax.org.uk> 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);
This sort of thing creates a lot of pressure at the 80 column barrier,
even when the names are not that long, and the nesting is not that deep.
// 80th col
value = medium_function_name(arg1, // brick
not_so_long_name(arg2a, // wall
arg2b, //
arg2c),//
arg3);
The actual colum I'm hitting here 57, but it only takes a few extra
indentation levels and slightly longer names before we find ourselves
at 80.
I found that working on a project which had a 100 column rule,
that rule went quite a long way toward relaxing the pressure.
-- TXR Programming Language: http://nongnu.org/txrCygnal: Cygwin Native Application Library: http://kylheku.com/cygnalMastodon: @Kazinator@mstdn.ca