TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

80-characters-per-line limits should be terminal, says Linus Torvalds

3 pointsby varbhatover 4 years ago

4 comments

mytailorisrichover 4 years ago
To me the argument is not only technical.<p>Of course these days a convention based on 80x25 terminals is anachronistic. But there is also a good reason to limit the length of lines for readability and indeed in typography the practice is to limit lines to ~50-70 characters. Personally I try to stick to that when I code because I find it more readable, and it&#x27;s not the same as automatic line wrapping.<p>In addition, unless you have heavily nested branches or loops with big-ish indentation, you don&#x27;t often get to 80 characters anyway, which opens another discussion on whether code with 10 levels of nested &#x27;if&#x27; or extra long sequences of boolean operators begs to be refactored.
评论 #25630512 未加载
KirillPanovover 4 years ago
Would be nice if editors displayed lines longer than the terminal width wrapped (like notepad&#x2F;textpad&#x2F;etc do for prose) but with the programming-language-appropriate indentation.
ufoover 4 years ago
Previous discussion: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=23356607" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=23356607</a>
simonblackover 4 years ago
My &#x27;personal standard&#x27; is 58 lines of 115 characters whenever I launch a new xterm.<p>Even then I often extend the width to 150 or more characters, depending on what I am doing.