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

Programmer Humor

19623 readers
2 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
 
you are viewing a single comment's thread
view the rest of the comments
[–] Traister101 96 points 9 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.

[–] zea_64@lemmy.blahaj.zone 17 points 9 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

[–] coloredgrayscale@programming.dev -3 points 9 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)

[–] Traister101 9 points 9 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)