| Deutsch English Français Italiano |
|
<vprv75$3jmqu$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Janis Papanagnou <janis_papanagnou+ng@hotmail.com> Newsgroups: comp.lang.c Subject: Re: Which code style do you prefer the most? Date: Fri, 28 Feb 2025 10:21:39 +0100 Organization: A noiseless patient Spider Lines: 45 Message-ID: <vprv75$3jmqu$1@dont-email.me> References: <vpkmq0$21php$1@dont-email.me> <vpl62m$250af$1@dont-email.me> <87frk10w51.fsf@onesoftnet.eu.org> <vpn8vs$2jmv1$1@dont-email.me> <vpn92i$86q$1@reader1.panix.com> <vpodnf$2q6ak$4@dont-email.me> <vpovd0$30d00$1@dont-email.me> <vpp011$30evb$1@dont-email.me> <vpp8ag$31ooi$1@dont-email.me> <vppaeq$323aa$1@dont-email.me> <vprpss$3ipmu$1@dont-email.me> <vprtlj$3jdn5$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Date: Fri, 28 Feb 2025 10:21:41 +0100 (CET) Injection-Info: dont-email.me; posting-host="7f1edf13f3a2bd11a154e43fc59f18be"; logging-data="3791710"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX180JJWa9c0UCCQdIJEM2clb" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 Cancel-Lock: sha1:wgC5Vfmqv4iwChoH44FoC3vAu7U= X-Enigmail-Draft-Status: N1110 In-Reply-To: <vprtlj$3jdn5$1@dont-email.me> Bytes: 2965 On 28.02.2025 09:55, Richard Heathfield wrote: > On 28/02/2025 07:50, Janis Papanagnou wrote: >> On 27.02.2025 10:15, Lawrence D'Oliveiro wrote: >>> On Thu, 27 Feb 2025 09:38:40 +0100, Janis Papanagnou wrote: >>> >>>> Too deep indenting I consider to be a possible bad structuring >>>> effect ... >>> >>> Would you consider half a dozen indentation levels to be too many? I >>> frequently go that deep. >> >> To be honest, I've never counted them. So why should I suggest someone >> else what's a "good" value. Programmers certainly should have got (or >> develop) a feeling about what's acceptable and what's too much in their >> own playground (or in project contexts where many people cooperate). >> >> But since you were asking I got curious; I pick one recent "C" source >> from one of my toy projects and get this distribution of the amount of >> indents >> >> 80 - // empty lines >> 169 0 >> 254 1 >> 172 2 >> 122 3 >> 46 4 >> 34 5 >> 7 6 >> 3 7 >> >> What would be your typical indent distribution in your "C" source code? > > I looked at around 100 KLOC and was surprised to find that my modal > indent count was 3, which is lower than I expected. Intuitively I've also expected (slightly) higher values. (But obviously my code structuring wasn't as bad as I thought. :-) > 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. Janis