One of the oldest coding practice is to keep line width 80, and many of us follow it blindly but have you ever thought why we have this practice in first place?
I believe it was to make your code more readable in the age of small monitors so that whole content can fit in the screen, or it might have originated from the age of punch card, which was used to be 80 column wide.
This sounds reasonable when we think about those old days but do you think this rule makes sense in 2018? We are now living in the age where most of the developers have got
One more reason people give for still using a column with of 80 is that nowadays they are working with multiple files at once.
For example, if you use standard column width you can fit a couple of files across a reason and can compare them line by line, which I believe is a real benefit.
You can even do a three-way merge inspection on one screen without scrolling sideways. By the way, this should not be done at cost of excessive wrapping.
I understand that consistent columns make it easier to scan and read through text but it doesn’t matter whether it’s 80 or 120.
On a closing note, I would say that consistency is nice and you must go for it but 80 or even 100 is too short.
Many developers could probably live with 120 or even 150 though. Our modern widescreen high definition LCD monitors can easily handle more.
It is much more readable than the excessive wrapping because I personally find it much harder to read a wrapped line than just seeing the whole thing in one line. Of course, this is just preference and others will feel different.
So, what do you guys think, does this rule still hold or you have already moved on?