http://www.perlmonks.org?node_id=999858


in reply to 78/80 chars perl line still a meaningful rule

Count the chars in a typical line in a newspaper column. It will vary a bit with the format of the paper, but generally won't exceed 40-50.

There may be a (retro-justification) reason for that: a good deal of research on comprehensibility identifies something in the 40-60 range as optimal (given the head and eye movement issues cited by talexb) and that isn't far off from AM's offering at Re^2: 78/80 chars perl line still a meaningful rule.

But code is NOT prose and that fact may be an argument for even shorter lines in code (allowing for occasional longer ones if those don't split reasonably. Generally, tho, I find that a 2 or 3 char indent on an extended line (ie, one with a CR that isn't really supposed to end the line).

  • Comment on Re: 78/80 chars perl line still a meaningful rule