2 ms·
I used to be fanatical about 78 character width because we would print code from time to time and following wrapping lines can be a royal pain (ahh, the 90's).
by davismwfl 14y ago
I used to be fanatical about 78 character width because we would print code from time to time and following wrapping lines can be a royal pain (ahh, the 90's).
Anymore I have been "ok" with 120 characters for most code, mostly because screen sizes have gotten so nice and I rarely print code anymore.
That said, I do still try and keep code around 80 characters wide where ever possible though, I just find the formatting and code legibility to be better in most circumstances. Also, I find this keeps people from nesting things too deep (C/C++/C# come to mind), because it becomes hard to follow the code, hence they start breaking code into more modular components.
My other reason, I sometimes work off only my laptop monitor and while it gets wide, I find myself scrolling left and right when code exceeds 90ish characters in width and that bugs me.
- eduardordm 14y agoProgrammers using line lengths as a reason to building modular software is something that I never heard in my life, not even as a joke.
- yen223 14y agoFor object-oriented languages, long line lengths are signs that you are violating the Law of Demeter: http://en.wikipedia.org/wiki/Law_of_Demeter http://en.wikipedia.org/wiki/Law_of_Demeter