Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Janis Papanagnou Newsgroups: comp.lang.c Subject: Re: Which code style do you prefer the most? Date: Fri, 28 Feb 2025 14:26:13 +0100 Organization: A noiseless patient Spider Lines: 52 Message-ID: References: <87frk10w51.fsf@onesoftnet.eu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Date: Fri, 28 Feb 2025 14:26:14 +0100 (CET) Injection-Info: dont-email.me; posting-host="bff3f8510287c0630e92bdcf8ff4873c"; logging-data="3877473"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18kng3hTXBLGHwyWLhIfEXZ" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 Cancel-Lock: sha1:DMHywnTErgDjSTwdTMJrDx7eloU= X-Enigmail-Draft-Status: N1110 In-Reply-To: Bytes: 3371 On 28.02.2025 11:19, Richard Heathfield wrote: > On 28/02/2025 09:21, Janis Papanagnou wrote: >> On 28.02.2025 09:55, Richard Heathfield wrote: > >> >>> 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); Actually, this sort of structure was exactly what I thought of when you spoke about such huge indent values. I don't have such extreme formatting, but structural similar variants; elsewhere I had posted this fragment if (sscanf (mutations, "r:%u,g:%u,a:%u,d:%u", &mutation_rates.base, &mutation_rates.genesis, &mutation_rates.aging, &mutation_rates.death ) != 4) but I have the habit to not use Tabs for the excess indenting; informally written it looks like if (sscanf (mutations, "r:%u,g:%u,a:%u,d:%u", &mutation_rates.base, &mutation_rates.genesis, &mutation_rates.aging, &mutation_rates.death ) != 4) so that the code structure and alignment stays the same when changing indent tabs (from 4) to values of, say, 8 or 2. The side-effect is that the space-alignment gets not counted as [arbitrary long] indents when counting the leading . Janis