Re: Update of Coding standards line length
| From: | Igor Feghali | Date: | Tue, 25 Nov 2008 18:00:27 +0000 |
| Subject: | Re: Update of Coding standards line length | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-51152@lists.php.net to get a copy of this message | ||
I would agree with Linus here:
"The limit on the length of lines is 80 columns and this is a hard limit." [1]
IMO having a wider screen doesn't mean one can read longer texts.
Breaking a long line into small chunks helps a better understanding on
what is going on plus "normalize" the code horizontally making it more
elegant (and again, readable).
Suppose you increase the line length limit to 300 chars. Most of your
code will be < 80 anyway. So you will end up with something like:
.
..
.
...
.................. => 300 chars string
.
..
.
While if you keep the lines smaller:
........
...........
.........
...........
......
.......
.........
regards,
Igor Feghali.
[1] http://kerneltrap.org/files/Jeremy/CodingStyle.txt