this post was submitted on 10 Feb 2024
594 points (96.8% liked)

196

16574 readers
1876 users here now

Be sure to follow the rule before you head out.

Rule: You must post before you leave.

^other^ ^rules^

founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] psycho_driver 46 points 9 months ago (1 children)

Allman works best if you like folding code blocks.

[–] [email protected] 4 points 9 months ago (1 children)
[–] psycho_driver 3 points 9 months ago (1 children)

If you use if (blah) { then when you fold your code you still see the { but not the closing } (I suppose some IDEs might be smart enough to do something about this, but when not it looks like your code has an overbite).

And then you've got a mental disorder if you indent your opening and closing brace more than the statement spawning them.

[–] [email protected] 4 points 9 months ago

Yeah, I just don't see why IDEs couldn't make them all fold in the same way. It's trivial. I don't see it as a valid complaint.