I'm new to the software industry and recently attended a training session where the instructor claimed that using four spaces is generally more optimized than using tabs. One explanation was that code reviews may not always happen in an IDE. They described a workflow where automated processing converted code changes into a PDF, which was then printed and reviewed on paper. That sounds extremely unusual to me. Is this something developers actually encounter, perhaps in highly regulated industries, or was the example outdated or misunderstood? Also, is there any real technical advantage to four spaces over tabs, or is it mainly a matter of team style and consistency?
3 Answers
The paper-review story sounds like an outdated or highly unusual process. Physical code archives did exist before modern tooling, and some regulated workplaces may keep printed records, but reviewing every change on paper is impractical and makes searching, comparing, and tracking discussions much harder. Even security-focused companies generally review code on controlled digital systems.
Tabs versus spaces is mostly a formatting preference and tooling issue, not a performance issue. Tabs are specifically intended for indentation and can be configured per editor, while spaces can be more predictable in systems that render tabs inconsistently. Either choice works well when automated formatting and team conventions keep the code uniform.
Four spaces are not inherently more optimized than a tab. Whitespace used for indentation is usually insignificant to program performance; the important thing is that the project follows one consistent convention. Tabs have the advantage that editors can display them at different widths, while spaces guarantee the same visual width everywhere. Most teams settle this with a formatter or style guide.

That kind of workflow could exist where strict audit trails are required, but it would be a special case rather than something most developers should expect.