5 ms·
Why is 80 characters the 'standard' limit for code width?
- originalgeek 14y agoBecause if a statement needs more than 80 chars, it's either too long, or too deeply nested.
- naner 14y agoThe highest-rated answer doens't explain anything... he just says that IBM's punch cards had 80 colums. What does that have to do with conventions for entering text in an editor?
- Someone 14y agoThe card puncher was the editor.
- jpterry 14y agoRelatedly, github insists on this width in both their language style guides and code windows on the web site. The VT100 had a 132 columns and was released 34 years ago! Why are we still limiting code to 80 characters per line?
- ternaryoperator 14y agoI find 132 columns is too wide for code (Good for tabular data, but not for code.) I want something I can read by running my eyes down the code. For me, this means no more than about 90 characters. A width of 132 cols means I have to stop and read back and forth, making it impossible to scan for something. Of course, YMMV.