this post was submitted on 28 Feb 2024
636 points (97.2% liked)

Programmer Humor

19589 readers
947 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
636
wait what (pawb.social)
submitted 8 months ago* (last edited 8 months ago) by [email protected] to c/[email protected]
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 92 points 8 months ago (17 children)

Tabs are objectively the better choice as it allows each dev individually to decide tab width in their editors. Spaces in contrast don't allow this same flexibility as they are used for much more than simply indentation, for example you likely put a space after each argument or operator IE func(arg1, arg2) or 1 + 2.

[–] [email protected] 17 points 8 months ago (4 children)

Also, a lot of editors won't unindent on backspace of spaces indentation, so I end up messing up the indentation with a 3/4 indent

[–] [email protected] -3 points 8 months ago (2 children)

Autoformatter should fix that, unless you use python. (but even then they might fix it to the closest proper indentation level)

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

Sometimes. I love auto formatting, I spam the shit out of it more than I spam save but it's definitely not perfect. It gets real confused with inconsistent indention like that. Especially with Python it'll fuckup

load more comments (1 replies)
load more comments (2 replies)
load more comments (14 replies)