On Sat, 23 Jun 2001, Andy Armstrong wrote:

> Here we go... ;-)
> 
> I like tabs set to four spaces, tabs in source rather than spaces and
> opening braces on a new line. How evil does that make me?
> 

The conventions we follow are documented on the Jakarta web site:

  http://jakarta.apache.org/site/source.html

which points at "Code Conventions for the Java Programming Language":

  http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html

There, you will find that the standard tab interval is 8 spaces.  The use
of spaces versus actual tab characters is not mandated absolutely in the
document -- but usage shows that tabs make CVS commit messages MUCH harder
to read, so spaces should be preferred.

That being said, there are the usual caveats:

* There's lots of old code that does not conform to these
  conventions, or the other suggested conventions for
  things like bracket locations and spacing.  Politeness
  and historical convention say you should maintain the style
  of the surrounding code when you're doing a patch, but follow
  the standards on new code.

* There are existing Tomcat committers who adamantly swear
  by using tab characters (who will speak up if they feel
  like it :-) despite the community's repeatedly expressed
  convention for spaces.

So, to answer your questions, tabs set at four spaces and tabs in the
source violates two of the common conventions.

Craig

Reply via email to