Tabs separate semantic indentation from visual presentation, letting everyone choose display width without touching the file.
Indentation is structural, not cosmetic; a tab encodes “one level” in a single character that each developer can render as 2, 4, or 8 columns. This respects accessibility and ergonomics—people with different visual needs, screens, and fonts can tune readability without creating churn. Spaces hard-code a single visual choice into the repo and force a one-size-fits-all compromise. Tabs turn preference into a view setting instead of a source-of-truth battle.
Tabs reduce diff noise and merge churn by preventing visual-width changes from rewriting bytes.
With tabs, editors and formatters adjust indentation appearance without modifying the underlying text, so code reviews center on logic rather than whitespace churn. Space-based re-indents often explode into sweeping diffs for purely visual tweaks, burying signal under noise. The common discipline of “tabs for indentation, spaces for alignment” also preserves column alignment across teammates with different tab widths. When whitespace stops fighting the VCS, teams move faster and reviewers spot real issues sooner.
Tabs compress leading whitespace by 50–87.5% compared to 2–8-space styles, shrinking files, diffs, and I/O.
A tab is one byte; two spaces are two bytes (50% saving), four spaces are four bytes (75% saving), and eight spaces are eight bytes (87.5% saving) for each indent level. In deeply nested, large codebases, leading whitespace adds up, so fewer bytes mean lighter diffs, faster checkouts, and smaller CI logs. These reductions scale linearly with indentation depth and line count without altering program semantics. It’s a simple, universal efficiency gain applied to every indented line.
Tabs have proven, large-scale precedent—gofmt and the Linux kernel use tabs for indentation—showing the approach is practical and enforceable.
Go’s official formatter emits tabs for leading indentation (and uses spaces only for alignment), ending debates and guaranteeing stable, predictable diffs. The Linux kernel style guide mandates tabs for indentation, and that policy has held up across decades, editors, and platforms. These exemplars demonstrate that tabs integrate cleanly with linters, IDEs, terminals, and code review systems at serious scale. If you want a boring, reliable standard that tooling can enforce, tabs already have a track record.