On 07/12/2010 22:22, Sylvain Laurent wrote: > > On 7 déc. 2010, at 17:35, Mark Thomas wrote: >> +1. Line length is an area I am becoming increasingly happy to be >> flexible. Aim for 80 but if 81 or 82 (or anything < ~90) makes the code >> more readable then I'd be fine with it. > > As a rookie, I did not want to start bothering you with this, but since you > bring the topic...
We are both committers and so your opinion holds as much weight as mine or any other committer. > I think 80 is somewhat outdated: screens are now bigger, and especially wider > (16:9 vs 4:3). > I think we should allow a greater line length to reduce the code height (the > number of lines). > My preference is 100 characters per line. That is a fair point. The times I work on a screen where >80 is an issue are far, far fewer than the times when a longer line length would make the code more readable. The way I like to have my IDE set up, 100 is a little too wide. 90 is manageable which is why I said usually 80 with the flexibility to go to 90 if it makes the code more readable. Of course, I have been looking for an excuse to buy myself a nice new wide-screen monitor ;) Based on a couple of classes I have been working on recently, a longer line length doesn't seem to offer too much in the way of fewer lines. My guess is 80->90 reduces line count by ~3% and 90->100 by a similar amount. I am sure it will vary by class. My own view is that we should generally stick to 80 but treat it as a guideline and use longer lines where it improves readability but lines longer than 90 really should be the exception when there is no place available to break the line. As I said, all this is just my opinion. There is no formal limit but the current code generally sticks to 80. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org