tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <co...@m64.com>
Subject RE: example (spaces vs. tabs)
Date Tue, 04 Jan 2000 15:09:16 GMT
I don't think formatting tools or editor configurations is the issue here.
The real problem is that the use of tabs or spaces is left unspecified. If
we were to agree that only spaces were to be used, I'm confident the people
who submit patches could configure their editors appropriately.

If people submitting patches were to use something like JIndent now, the
relevant patch content would be lost in a maze of tab to space diffs. Maybe
use of JIndent or some such tool could be used by committers after
application of patches to gradually move us to a system of just using
spaces.

Perhaps to try and close this issue, I suggest the committers vote on
whether to tighten the coding conventions to mandate use of spaces and
prohibit tabs. Is that the appropriate process?

Interestingly while there is a lot of heat about the tab versus space issue,
there are stacks of other "violations" of the code conventions. In some
cases the Sun conventions are fairly out of step with what I believe to be
common practice such as this statement

   "The // comment delimiter can comment out a complete
    line or only a partial line. It shouldnÂ’t be used on
    consecutive multiple lines for text comments"

Does anyone subscribe to this view? Another commonly violated convention is

   "Note: if statements always use braces {}. Avoid the
    following error-prone form:

     if ( condition) //AVOID! THIS OMITS THE BRACES {}!
        statement;"

The use of "always" is a pretty strong statement. I'm not trying to be
pedantic; If there is to be a coding convention, then we should adhere to it
:-) If it isn't right, then we should change it, augment it, tighten it, fix
it, whatever. Perhaps a document with clarifications or exceptions to the
Sun Code Conventions would be appropriate.

Cheers
Conor

--
Conor MacNeill
conor@m64.com
M64 Pty Limited

> -----Original Message-----
> From: David Chisholm [mailto:David_Chisholm@i2.com]
> Sent: Wednesday, 5 January 2000 1:06
> To: tomcat-dev@jakarta.apache.org
> Subject: Re: example (spaces vs. tabs)
>
> Have you tried JIndent (http://home.wtal.de/software-solutions/jindent/).
> It's very good at fixing these kinds of problems.  We're adding it as an
> automatic step of our configuration management system.  Perhaps the same
> could be done for this system.
> David
>
> ----- Original Message -----
> From: James Todd <jwtodd@pacbell.net>
> To: <tomcat-dev@jakarta.apache.org>
> Sent: Tuesday, January 04, 2000 1:13 AM
> Subject: Re: example (spaces vs. tabs)
>
> >
> > agreed. perhaps some folks could share some emacs, vi, etc
> > config settings and/or hacks as to how best to use spaces over
> > tabs ... vs 4 or 8 spacebar stabs :)
> >
> > <repeat>
> >     i used to like ?JBeautifier? for lots of features including
> >     a "tab to space conversion" which is a default config
> >     option if i recall correctly.
> > </repeat>
> >
>


Mime
View raw message