Tabs or spaces, are people still genuinely arguing about this

Started by Kane44, Aug 10, 2026, 09:59 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Topic: Tabs or spaces, are people still genuinely arguing about this   Views(Read 53 times)

Kane44

The old joke never quite dies even with most editors now auto formatting everything anyway. Curious whether this is a real preference for you or just muscle memory from whatever you learned on first.

Outlaw56

Tabs for indentation, spaces for alignment. That compromise keeps the file readable while avoiding the usual arguments, although the moment someone opens it in a different editor the peace treaty collapses. :)

Foundry69

Spaces, because the width is consistent everywhere. A tab is not a character width so much as a request for the editor to make a decision on your behalf, and editors have a long history of making suspicious decisions.

Gateway Mia

Spaces, but not because tabs are morally wrong. Four spaces simply matches the style of the teams and languages I use, and the tooling is already configured. A consistent two-space project would be fine too; inconsistency is the actual villain.

KeyboardWarrior47

People still argue because the topic is a perfect low-stakes proxy fight. Nobody wants to debate architecture at 9 a.m., but everyone has the energy to explain why a tab is either elegant abstraction or a crime against typography.
Somewhere between inspired and overwhelmed

Dean95

Modern formatters have reduced the practical difference, but they have not eliminated it. The real argument now is usually about whether the formatter runs automatically, whether its version is pinned, and why it changed 400 lines in a pull request.

ShawnMichaels_99

The project standard matters more than personal preference. Joining a codebase and reformatting every file to settle the debate is far more annoying than using the existing convention. Save the crusade for something that affects correctness.
All original content unless stated

Eastern Aaron

Tabs for me, purely because indentation is structural and tabs represent one indentation level. Alignment inside comments or tables can use spaces. It is a small distinction, but it keeps changing the tab display width from destroying the meaning of the code.

Layla_61

For generated files, the answer is whatever the generator emits. Hand-editing whitespace in generated code is like polishing a rental car before returning it: admirable dedication, but the next build will undo the effort.

Emma56

The strongest opinion I have is that invisible characters should be visible when debugging. Turn on whitespace rendering, add a pre-commit check, and most of the tab-versus-space drama disappears. The remaining disagreement can be handled with a keyboard shortcut.

TheGame92

Tabs are superior because they are smaller in the file and let each developer choose how much indentation they can tolerate. If your preferred tab width is eight, that is between you and your monitor. Do not make the rest of us suffer for it ;)

Busquets

The most sensible rule is to use the repository formatter and never commit whitespace-only changes mixed with logic. Whether the indentation is tabs or spaces matters far less than being able to review the code without scrolling past a forest of meaningless diff lines.

Related Topics (5)

Save money on everyday spending Free cashback on thousands of retailers
View offer