Re: Which code style do you prefer the most?

Liste des GroupesRevenir à cl c 
Sujet : Re: Which code style do you prefer the most?
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.lang.c
Date : 28. Feb 2025, 08:50:51
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vprpss$3ipmu$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
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 wouldn't expect something completely different, but I also wouldn't
care if there would be.)[*]

Janis

PS: Note that your frequent indents of level 6 would in my setting with
a TAB of four mean 24 colums and would leave (for an 80 column window)
still 56 columns for "C" statements (in case you don't want to pass the
limit).

PPS: In the mentioned toy project I have 849 lines that stay within 80
columns and 38 lines that exceed that limit; the histogram distribution

    N  line length range
  172   1-10
  128  11-20
  106  21-30
   90  31-40
   68  41-50
   51  51-60
  100  61-70
  134  71-80
   28  81-90
    8  91-100
    2 101-110

where the upper range is in more detail sparsely defined by

amount  line length
     ...
    1  91
    3  92
    1  93
    1  94
    1  95
    1  100
    1  101
    1  107

where the longer lines are not complex code but stem from lines with
(long) strings in fprintf() information. Lines with non-printf/string
code are generally of length <90, or even <85 (the one long getopt()
line also has a long string literal, as I got aware).

[*] BTW; my hypothesis is that the actual line length distribution is
depending on the used window sizes. I had observed that folks who use
wide editor windows (or IDEs with wide windows) create wider source
code. I usually use 80 columns editing windows and thus naturally get
an indication when to wrap lines (without actively thinking about it).


Date Sujet#  Auteur
25 Feb 25 * Which code style do you prefer the most?272Ar Rakin
25 Feb 25 +* Re: Which code style do you prefer the most?108David LaRue
25 Feb 25 i`* Re: Which code style do you prefer the most?107Ar Rakin
25 Feb 25 i +* Re: Which code style do you prefer the most?104David Brown
25 Feb 25 i i+* Re: Which code style do you prefer the most?102Ar Rakin
25 Feb 25 i ii`* Re: Which code style do you prefer the most?101David Brown
25 Feb 25 i ii +* Re: Which code style do you prefer the most?3Janis Papanagnou
26 Feb 25 i ii i`* Re: Which code style do you prefer the most?2David Brown
26 Feb 25 i ii i `- Re: Which code style do you prefer the most?1Janis Papanagnou
26 Feb 25 i ii `* Re: Which code style do you prefer the most?97Ar Rakin
26 Feb 25 i ii  +* Re: Which code style do you prefer the most?4Janis Papanagnou
27 Feb 25 i ii  i`* Re: Which code style do you prefer the most?3Lawrence D'Oliveiro
27 Feb 25 i ii  i +- Re: Which code style do you prefer the most?1Janis Papanagnou
27 Feb 25 i ii  i `- Re: Which code style do you prefer the most?1Ar Rakin
26 Feb 25 i ii  `* Re: Which code style do you prefer the most?92David Brown
26 Feb 25 i ii   `* Re: Which code style do you prefer the most?91Bradley K. Sherman
26 Feb 25 i ii    +* Re: Which code style do you prefer the most?48David Brown
26 Feb 25 i ii    i+* Re: Which code style do you prefer the most?41Janis Papanagnou
26 Feb 25 i ii    ii`* Re: Which code style do you prefer the most?40David Brown
27 Feb 25 i ii    ii `* Re: Which code style do you prefer the most?39Janis Papanagnou
27 Feb 25 i ii    ii  `* Re: Which code style do you prefer the most?38David Brown
28 Feb 25 i ii    ii   +* Re: Which code style do you prefer the most?25Richard Harnden
28 Feb 25 i ii    ii   i`* Re: Which code style do you prefer the most?24Michael S
28 Feb 25 i ii    ii   i +- Re: Which code style do you prefer the most?1Lawrence D'Oliveiro
2 Mar 25 i ii    ii   i `* Re: Which code style do you prefer the most?22Tim Rentsch
3 Mar 25 i ii    ii   i  +* Re: Which code style do you prefer the most?6Michael S
3 Mar 25 i ii    ii   i  i+* Re: Which code style do you prefer the most?4bart
3 Mar 25 i ii    ii   i  ii+* Re: Which code style do you prefer the most?2Richard Harnden
3 Mar 25 i ii    ii   i  iii`- Re: Which code style do you prefer the most?1bart
4 Mar 25 i ii    ii   i  ii`- Re: Which code style do you prefer the most?1Lawrence D'Oliveiro
3 Mar 25 i ii    ii   i  i`- Re: Which code style do you prefer the most?1Tim Rentsch
3 Mar 25 i ii    ii   i  +- Re: Which code style do you prefer the most?1Tim Rentsch
4 Mar 25 i ii    ii   i  `* Re: Which code style do you prefer the most?14Keith Thompson
4 Mar 25 i ii    ii   i   +* Re: Which code style do you prefer the most?7Lawrence D'Oliveiro
4 Mar 25 i ii    ii   i   i`* Re: Which code style do you prefer the most?6Janis Papanagnou
4 Mar 25 i ii    ii   i   i `* Re: Which code style do you prefer the most?5Lawrence D'Oliveiro
4 Mar 25 i ii    ii   i   i  +- Re: Which code style do you prefer the most?1Keith Thompson
4 Mar 25 i ii    ii   i   i  `* Re: Which code style do you prefer the most?3Lawrence D'Oliveiro
5 Mar 25 i ii    ii   i   i   `* Re: Which code style do you prefer the most?2Janis Papanagnou
5 Mar 25 i ii    ii   i   i    `- Re: Which code style do you prefer the most?1Lawrence D'Oliveiro
21 Mar 25 i ii    ii   i   `* Re: Which code style do you prefer the most?6Tim Rentsch
22 Mar 25 i ii    ii   i    +* Re: Which code style do you prefer the most?2Tim Rentsch
22 Mar 25 i ii    ii   i    i`- Re: Which code style do you prefer the most?1Tim Rentsch
1 Apr04:46 i ii    ii   i    `* Re: 80 char lines and holerith cards [Was:Which code style do you prefer the most?]3Jakob Bohm
1 Apr08:46 i ii    ii   i     +- Re: 80 char lines and holerith cards [Was:Which code style do you prefer the most?]1Janis Papanagnou
1 Apr18:11 i ii    ii   i     `- Re: 80 char lines and holerith cards [Was:Which code style do you prefer the most?]1Janis Papanagnou
28 Feb 25 i ii    ii   `* Re: Which code style do you prefer the most?12Janis Papanagnou
28 Feb 25 i ii    ii    `* Re: Which code style do you prefer the most?11David Brown
28 Feb 25 i ii    ii     +* Re: Which code style do you prefer the most?9Richard Harnden
28 Feb 25 i ii    ii     i+- Re: Which code style do you prefer the most?1David Brown
28 Feb 25 i ii    ii     i`* Re: Which code style do you prefer the most?7Lawrence D'Oliveiro
1 Mar 25 i ii    ii     i `* Re: Which code style do you prefer the most?6Richard Harnden
1 Mar 25 i ii    ii     i  +* Re: Which code style do you prefer the most?4Richard Heathfield
1 Mar 25 i ii    ii     i  i`* Re: Which code style do you prefer the most?3Keith Thompson
1 Mar 25 i ii    ii     i  i +- Re: Which code style do you prefer the most?1Richard Harnden
1 Mar 25 i ii    ii     i  i `- Re: Which code style do you prefer the most?1David Brown
1 Mar 25 i ii    ii     i  `- Re: Which code style do you prefer the most?1Lawrence D'Oliveiro
1 Mar 25 i ii    ii     `- Re: Which code style do you prefer the most?1Janis Papanagnou
26 Feb 25 i ii    i+- Re: Which code style do you prefer the most?1David Brown
27 Feb 25 i ii    i+* Re: Which code style do you prefer the most?2Ar Rakin
27 Feb 25 i ii    ii`- Re: Which code style do you prefer the most?1David Brown
9 Mar 25 i ii    i`* Re: Which code style do you prefer the most?3Tim Rentsch
9 Mar 25 i ii    i `* Re: Which code style do you prefer the most?2Janis Papanagnou
10 Mar 25 i ii    i  `- Re: Which code style do you prefer the most?1Tim Rentsch
27 Feb 25 i ii    `* Re: Which code style do you prefer the most?42Lawrence D'Oliveiro
27 Feb 25 i ii     `* Re: Which code style do you prefer the most?41Janis Papanagnou
27 Feb 25 i ii      `* Re: Which code style do you prefer the most?40Lawrence D'Oliveiro
27 Feb 25 i ii       `* Re: Which code style do you prefer the most?39Janis Papanagnou
27 Feb 25 i ii        `* Re: Which code style do you prefer the most?38Lawrence D'Oliveiro
28 Feb 25 i ii         `* Re: Which code style do you prefer the most?37Janis Papanagnou
28 Feb 25 i ii          +* Re: Which code style do you prefer the most?33Richard Heathfield
28 Feb 25 i ii          i`* Re: Which code style do you prefer the most?32Janis Papanagnou
28 Feb 25 i ii          i `* Re: Which code style do you prefer the most?31Richard Heathfield
28 Feb 25 i ii          i  +- Re: Which code style do you prefer the most?1Janis Papanagnou
28 Feb 25 i ii          i  +* Re: Which code style do you prefer the most?4bart
28 Feb 25 i ii          i  i+* Re: Which code style do you prefer the most?2Michael S
28 Feb 25 i ii          i  ii`- Re: Which code style do you prefer the most?1Lawrence D'Oliveiro
28 Feb 25 i ii          i  i`- Re: Which code style do you prefer the most?1Ar Rakin
28 Feb 25 i ii          i  +- Re: Which code style do you prefer the most?1Chris M. Thomasson
28 Feb 25 i ii          i  +- Re: Which code style do you prefer the most?1Kaz Kylheku
28 Feb 25 i ii          i  `* Re: Which code style do you prefer the most?23Lawrence D'Oliveiro
1 Mar 25 i ii          i   `* Re: Which code style do you prefer the most?22David Brown
1 Mar 25 i ii          i    +* Re: Which code style do you prefer the most?20Janis Papanagnou
1 Mar 25 i ii          i    i`* Re: Which code style do you prefer the most?19Lawrence D'Oliveiro
1 Mar 25 i ii          i    i `* Re: Which code style do you prefer the most?18Janis Papanagnou
2 Mar 25 i ii          i    i  +* Re: Which code style do you prefer the most?12Keith Thompson
2 Mar 25 i ii          i    i  i+* Re: Which code style do you prefer the most?2Lawrence D'Oliveiro
2 Mar 25 i ii          i    i  ii`- Re: Which code style do you prefer the most?1Keith Thompson
2 Mar 25 i ii          i    i  i+- Re: Which code style do you prefer the most?1Tim Rentsch
2 Mar 25 i ii          i    i  i+- Re: Which code style do you prefer the most?1Janis Papanagnou
2 Mar 25 i ii          i    i  i+- Re: Which code style do you prefer the most?1Janis Papanagnou
2 Mar 25 i ii          i    i  i+* Re: Which code style do you prefer the most?3bart
2 Mar 25 i ii          i    i  ii+- Re: Which code style do you prefer the most?1Keith Thompson
2 Mar 25 i ii          i    i  ii`- Re: Which code style do you prefer the most?1Lawrence D'Oliveiro
2 Mar 25 i ii          i    i  i`* Re: Which code style do you prefer the most?3David Brown
2 Mar 25 i ii          i    i  i `* Re: Which code style do you prefer the most?2bart
2 Mar 25 i ii          i    i  i  `- Re: Which code style do you prefer the most?1David Brown
2 Mar 25 i ii          i    i  `* Re: Which code style do you prefer the most?5Janis Papanagnou
2 Mar 25 i ii          i    i   +* [OT] Pascal identifiers [digression] (was Re: Which code style do you prefer the most?)3Janis Papanagnou
2 Mar 25 i ii          i    i   i`* Re: [OT] Pascal identifiers [digression] (was Re: Which code style do you prefer the most?)2Keith Thompson
3 Mar 25 i ii          i    i   i `- Re: [OT] Pascal identifiers [digression] (was Re: Which code style do you prefer the most?)1Lawrence D'Oliveiro
2 Mar 25 i ii          i    i   `- Re: Which code style do you prefer the most?1Lawrence D'Oliveiro
1 Mar 25 i ii          i    `- Re: Which code style do you prefer the most?1Dan Cross
2 Mar 25 i ii          `* Re: Which code style do you prefer the most?3Tim Rentsch
25 Feb 25 i i`- Re: Which code style do you prefer the most?1Janis Papanagnou
25 Feb 25 i +- Re: Which code style do you prefer the most?1Ar Rakin
25 Feb 25 i `- Re: Which code style do you prefer the most?1Janis Papanagnou
25 Feb 25 +* Re: Which code style do you prefer the most?42John McCue
25 Feb 25 +* Re: Which code style do you prefer the most?2Rosario19
25 Feb 25 +- Re: Which code style do you prefer the most?1Janis Papanagnou
25 Feb 25 +* Re: Which code style do you prefer the most?57Lawrence D'Oliveiro
2 Mar 25 +- Re: Which code style do you prefer the most?1Tim Rentsch
4 Mar 25 +* Re: Which code style do you prefer the most?59Anton Shepelev
18 Mar 25 `- Re: Which code style do you prefer the most?1Bonita Montero

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal