On Dec 13, 2010, at 10:22 AM, Bertrand Delacretaz wrote: > On Mon, Dec 13, 2010 at 10:03 AM, Fabian Christ > <[email protected]> wrote: >> 2010/12/13 Rupert Westenthaler <[email protected]>: >>> ...I would suggest to exclude this point and allow longer lines than 80 >>> chars... > >> Yes, I agree with Rupert. I normally don't use any auto line break at >> all and set line length to 999.... > > Agreed...for me "something around the width of a modern display" is fine.
As I said, *my* modern IDE has 120 chars, and when I edit code with vi in a console, or TextMate I even have only 80 characters. So the 80-120 rules makes sense to me, and I don't think I'm the exception. > I don't care much about 2 or 4 spaces for indents, usually use 4. But > no tabs, agreed. > > In general, my opinion is to avoid being religious on these things, > and above all avoid needlessly reformatting source code (initial > cleanup like we're doing now is fine of course). Agreed. > My advice is: if you just change a few lines in an existing file, just > follow that file's style. And above all don't mix reformatting and > code changes in commits as I said elsewhere. I agree that when you are a newcomer to an existing code base, you should by all mean refrain from reformatting the code to your own taste, if the code base already uses a consistent convention. OTOH, I think it gives a very bad impression to newcomers or people that just want to study your code (for some reason, including evaluating it for their own use) if they find that you're using very inconsistent styles in your code base, i.e. tabs vs spaces, 2 vs 4 indents, 1TBS (http://en.wikipedia.org/wiki/Indent_style#Variant:_1TBS) vs. Allman, etc. > That being said, +1 on the proposed "rules" - which I'm sure you'll > see me break where it makes sense ;-) No problem with breaking the rules when it's done with taste and only exceptionally. S. -- Stefane Fermigier, Founder and Chairman, Nuxeo Open Source, Java EE based, Enterprise Content Management (ECM) http://www.nuxeo.com/ - +33 1 40 33 79 87 - http://twitter.com/sfermigier Join the Nuxeo Group on LinkedIn: http://linkedin.com/groups?gid=43314 New Nuxeo release: http://nuxeo.com/dm54 "There's no such thing as can't. You always have a choice."
