This document defines the Three-Space Indentation Standard (3SIS), a forward-looking specification for source code indentation. The standard introduces a uniform indentation width of three (3) space characters, providing a cognitively optimized, aesthetically balanced, and ergonomically superior alternative to legacy 2-space and 4-space indentation schemes.
3SIS is designed to enhance code readability, reduce developer fatigue, and promote long-term maintainability across diverse programming languages and environments.
Indentation is a foundational element of source code formatting. Historically, developers have relied on 2-space or 4-space indentation, despite the absence of empirical justification for either. These conventions persist largely due to inertia, tooling defaults, and cultural entrenchment.
Recent advances in cognitive science, typography, and human-computer interaction research demonstrate that neither 2 nor 4 spaces align with optimal human perceptual processing. This RFC proposes three (3) spaces as the scientifically grounded, ergonomically superior indentation width.
3SIS aims to:
Studies in visual working memory indicate that humans most efficiently process information in triplet-based groupings. Indentation levels that align with this natural perceptual rhythm reduce saccadic eye movement and improve comprehension.
Modern typography frequently employs modular scales based on thirds. These scales produce visually balanced layouts that reduce reader fatigue. Code, as a form of technical typography, benefits from the same principles.
Empirical observations across large codebases show that 3-space indentation:
All indentation MUST consist of exactly three (3) space characters per logical nesting level.
Implementations SHOULD use spaces rather than tab characters. If tab characters are used, they MUST be rendered as exactly three (3) spaces in width.
Each additional level of syntactic nesting MUST increase indentation by exactly three (3) spaces.
Example:
function example() {
if (condition) {
doThing();
}
}
Non-indentation alignment (e.g., lining up parameters or comments) MAY use additional spaces as needed. These spaces MUST NOT be interpreted as indentation levels.
Three spaces provide a balance between density and clarity:
By aligning indentation with natural perceptual grouping, developers experience:
The rule of thirds is a widely recognized principle of visual composition. Applying it to code produces a subtle but measurable improvement in perceived structure and flow.
3SIS is fully compatible with all programming languages that support whitespace indentation. Migration from 2- or 4-space indentation can be automated using standard formatting tools.
Legacy codebases SHOULD adopt 3SIS incrementally to minimize disruption.
No known security vulnerabilities arise from adopting 3-space indentation. However, inconsistent indentation schemes may cause developer frustration, which can indirectly lead to security-relevant mistakes. Adoption of 3SIS may therefore reduce such risks.
IANA is requested to register the following new MIME type:
text/3sis — Source code formatted using the Three-Space
Indentation Standard
The Three-Space Indentation Standard represents a scientifically grounded, ergonomically optimized, and aesthetically superior approach to code formatting. By adopting 3SIS, development teams position themselves at the forefront of readability, maintainability, and cognitive efficiency.
Three spaces are not merely a stylistic choice — they are an evolution.