this post was submitted on 10 Feb 2024
627 points (99.5% liked)
196
17071 readers
1241 users here now
Be sure to follow the rule before you head out.
Rule: You must post before you leave.
Other rules
Behavior rules:
- No bigotry (transphobia, racism, etc…)
- No genocide denial
- No support for authoritarian behaviour (incl. Tankies)
- No namecalling
- Accounts from lemmygrad.ml, threads.net, or hexbear.net are held to higher standards
- Other things seen as cleary bad
Posting rules:
- No AI generated content (DALL-E etc…)
- No advertisements
- No gore / violence
- Mutual aid posts require verification from the mods first
NSFW: NSFW content is permitted but it must be tagged and have content warnings. Anything that doesn't adhere to this will be removed. Content warnings should be added like: [penis], [explicit description of sex]. Non-sexualized breasts of any gender are not considered inappropriate and therefore do not need to be blurred/tagged.
If you have any questions, feel free to contact us on our matrix channel or email.
Other 196's:
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
idk, Allman is very readable. Easy to scan vertically to find the matching open brace. Not quite as vertically-space efficient as the best way, but it's not offensive.
Plus one for Allman gang
In my first ever programming class textbook was using Allman. Probably for this reason, it is easy for a beginner to match braces. It is a lot loss common industry to my knowledge.
this is only true if you don’t indent properly
I literally don't understand. I've read your comment several times and I don't know what you're talking about. Sorry!
Did you think I was saying that made Allman better than the best way? Because it's easy to scan vertically the best way, too. It's just also easy with Allman, so it's not offensive.
I don't think they were disagreeing with you, I think they were just trying to say:
You shouldn't need braces to be vertically aligned if your code is uniformly indented. Then you can easily see what code is paired together just by their indentation level.
Of course this is not always true if you've got a bunch of crazy nested indentation pushing things off to the right.