4 ms·
Interesting reading this. I stop mine still at generally 78 chars. This allows it to print in a large enough font to be fit on a single 8.5x11" page without a
by davismwfl 11y ago
Interesting reading this. I stop mine still at generally 78 chars. This allows it to print in a large enough font to be fit on a single 8.5x11" page without any extra wrapping.
I have also used 130 chars as the limit and printing source code on green bar paper. But at least to me, it just isn't worth it, IMO functions should never take more then 1 screen to view and that includes the limit of 78 chars and roughly 50ish lines. This makes code easy to grok and helps to make sure a function does only 1 thing. Not that there are not some exceptions but that is my general rule.
The 78 chars also comes from some older printers that had margin issues and if you went to exactly 80 they would wrap or add a blank line. Yea, I know, mostly stupid today, but it keeps the code super portable, predictable and very readable.