this post was submitted on 09 May 2024
434 points (92.1% liked)

Programmer Humor

32710 readers
1481 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 21 points 7 months ago (1 children)

It's important to remember that Linus is primarily writing about C code formatting. C doesn't have things that tend to create more deeply nested structures, such as a formal class syntax, or nested functions.

Going too deep is still bad--as zea notes, it's an indication of control structures run amok--but the exact number is dependent on the language and the context.

[โ€“] [email protected] 1 points 7 months ago

And you never include the switch-case-block indentation levels.