Community
Participate
Working Groups
Our current coding conventions [1] limit the length of a line to 80 characters. This leads to a lot of line breaks within statements, especially where classes and variables have long names. As single-line statements are much easier to read, this restriction often urges developers to abbreviate names to make a statement fit into a line. So this restriction contradicts with the rule to choose explanatory names. Rüdiger and I agreed that we should increase the line limit to 100 chars. Opinions? [1] http://wiki.eclipse.org/RAP/CodingConventions
+1
+1. My preferred line length limit is 120.
(In reply to comment #2) > +1. My preferred line length limit is 120. Even with a screen resolution of 1680px in width, I can't read 120 characters in the Eclipse editor area when package explorer and outline view are visible. And there are still some smaller screens around. Therefore I don't like to exceed 100 characters now. With this limit I guess, most of the reasonable statements will fit into one line.
It is my opinion that line length should be based on the screen real estate that a team works with. People don't print code anymore so they don't care that it fits nicely on a piece of paper and 80 character line length is based on the old Fortran days where column index was important and the max column was 80. However, I do think that setting the length too long will force people with lower resolutions to have to scroll horizontally, which is a mistake from a user interface perspective. I think that breaking up statements into multiple lines is in general preferable to long statements. There is some happy medium. 100 seems reasonable and equates to about 840 pixels on my monitor.
There were no objections and my impression is that we're all happy with 100 characters per line - so I guess we have agreed on this. Let's use 100 characters per line from now on. I have changed the formatter settings in CVS HEAD and adapted the wiki page.