Is there a valid reason for enforcing a maximum width of 80 characters in a code file, this day and age?

TraumaPony picture TraumaPony · Sep 21, 2008 · Viewed 43.2k times · Source

Seriously. On a 22" monitor, it only covers maybe a quarter of the screen. I need some ammo to axe down this rule.


I'm not saying that there shouldn't be a limit; I'm just saying, 80 characters is very small.

Answer

Will Harris picture Will Harris · Sep 21, 2008

I think the practice of keeping code to 80 (or 79) columns was originally created to support people editing code on 80-column dumb terminals or on 80-column printouts. Those requirement have mostly gone away now, but there are still valid reasons to keep the 80 column rule:

  • To avoid wrapping when copying code into email, web pages, and books.
  • To view multiple source windows side-by-side or using a side-by-side diff viewer.
  • To improve readability. Narrow code can be read quickly without having to scan your eyes from side to side.

I think the last point is the most important. Though displays have grown in size and resolution in the last few years, eyes haven't.