this post was submitted on 05 Sep 2023
167 points (79.7% liked)

Programming

17406 readers
104 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 [email protected]



founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 0 points 1 year ago (1 children)

inevitably there are times you need to use spaces

When? You indent with tabs then add any spaces you want for precise alignment. When would you need to use spaces to indent?

[–] [email protected] 5 points 1 year ago* (last edited 1 year ago) (1 children)

Do not mix tabs and spaces.

Its impossible to automate checking that tabs were only used for indentation and spacing for precise alignment. So you then take on a burden of manually checking

You end up with the issue where someone didn't realise and space idented or anouther person used tabs for precise alignment and people forget to check the whitespace characters in review and it ends up going inconsistent and becoming a huge pile of technical debt to fix.

Use only one, you can automate enforcement and ensure the code renders consistency.

[–] BatmanAoD 1 points 1 year ago* (last edited 1 year ago)

What did you mean by "inevitably there are times you need to use spaces", then?