Laying Out Individual Statements
This section explains many ways to improve individual statements in a program.
Statement Length
A common and somewhat outdated rule is to limit statement line length to 80 characters. Here are the reasons:
Cross-Reference
For details on documenting individual statements, see "Commenting Individual Lines" in Commenting Techniques.
Lines longer than 80 characters are hard to read.
The 80-character limitation discourages deep nesting.
Lines longer than 80 characters often won't fit on 8.5″ x 11″ paper, especially when code is printed "2 up" (2 pages of code to each physical printout page).
With larger screens, narrow typefaces, and landscape mode, the 80-character limit appears increasingly arbitrary. A single 90-character-long ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access