tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig McClanahan" <cmcclana...@mytownnet.com>
Subject Re: source code standards!!!!!
Date Thu, 21 Oct 1999 00:05:00 GMT
Hans Bergsten wrote:

> jon * wrote:
> >
> > on 10/20/99 4:22 PM, arun@hyperreal.org at arun@hyperreal.org wrote:
> >
> > > +
> > > +    public HttpURLConnection
> > > + getConnection(Hashtable headers, Hashtable queryString, String pathInfo,
> > > +        String method, boolean useCookie)
> > > + throws Exception {
> > > + this.useCookie = useCookie;
> > > + return getCon(headers, doQueryString(queryString), pathInfo, method);
> > > +    }
> >
> > hey all, i'm seeing checkins with a lot of tabs or bad formatting or both.
> > can we please agree on a standard?
>
> I agree, the code is hard to read with all the different conventions (or no
> convention ;-) being used. I would also appreciate if everyone followed the
> http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html like we say
> on the site that we should.

I agree.  On the specific topic of tabs, though, note the first sentence of the
"Indentation" section (#4):

    Four spaces should be used as the unit of indentation. The exact construction
    of the indentation (spaces vs. tabs) is unspecified. Tabs must be set exactly
    every 8 spaces (not 4).

Thus, tabs themselves are not evil unless you set them for other than 8 characters
in your editor.

<flameproof underwear>
Emacs, in conjunction with a nice Java editing mode, makes the tab key smart -- it
follows the indentation rule described above automatically by pressing it once,
because it always knows the current indentation level.  It also is quite smart
about aligning the parts of multiline statements sanely.
</flameproof underwear>

Craig



Mime
View raw message