this post was submitted on 05 Sep 2023
2 points (100.0% liked)

Programming

17672 readers
92 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] Lucky@programming.dev 0 points 1 year ago (1 children)

The argument for having tabs adjust depending on your ide sounds better than it is in practice. Someone formatting code to look nice with width 4 will look horrendous for someone who uses width 8.

Spaces makes it uniform and captures the exact style the original dev intended

[–] CodeMonkey@programming.dev 0 points 1 year ago (1 children)

If you have your tab width set on 8, that is on you. You will also set your IDE to insert 8 spaces when you press TAB and I will cry when I have to give you a code review.

When I indent my code, I am indicating that I am in a nested block. I don't care if, on your screen, that indent is 2, 3, or 4 characters.

[–] Acters@lemmy.world 0 points 1 year ago (1 children)
[–] kevincox@lemmy.ml 1 points 1 year ago

That's fine, when I view it I will get my preferred tab width. This situation is only anarchist with spaces, with tabs they are just a masochist.