Tabs versus spaces is the perennial argument over how programmers should indent code: with literal tab characters, or with a fixed number of space characters. Both are invisible whitespace, both produce the same running program, and yet the question has generated decades of debate out of all proportion to its technical weight. It is the textbook example of a holy war, alongside the editor wars over vi and Emacs.
The case for tabs is semantic: one tab means one level of indentation, and each developer can set their editor to display a tab as two, four, or eight columns to taste, without touching the file. The case for spaces is that they render identically everywhere, in every editor, terminal, diff viewer, and web page, leaving no ambiguity about alignment. The trouble starts when a file mixes both, which can make code that looks correctly aligned actually be misaligned, and in Python can even change the program’s meaning.
Different language communities resolved the question by fiat in their style guides, which is why the debate persists across, but rarely within, a given ecosystem. Python’s PEP 8 states plainly that “Spaces are the preferred indentation method” and that “Tabs should be used solely to remain consistent with code that is already indented with tabs,” noting that “Python disallows mixing tabs and spaces for indentation.” Go went the other way: the Effective Go document declares “We use tabs for indentation and gofmt emits them by default. Use spaces only if you must.” Because gofmt reformats automatically, Go programmers do not argue about it at all.
That automatic-formatter approach, embodied by gofmt and later by tools like Prettier and Black, is arguably the real resolution. When a tool rewrites every file on save to a single canonical style, the choice stops being a matter of personal preference and becomes a property of the project, removing the friction from code review entirely. The decision still has to be made once, but it is made by the tool’s authors and never relitigated.
The debate became a cultural touchstone well beyond engineering. The HBO comedy “Silicon Valley” built an entire relationship-ending argument around a character’s horror at discovering his partner used spaces, and a widely cited 2017 analysis of Stack Overflow data even reported that developers who used spaces appeared to earn more than those who used tabs, a correlation that launched a thousand jokes and no settled causal explanation. The persistence of the joke is the point: the stakes are tiny, which is exactly why everyone has an opinion.