This is the mail archive of the
kawa@sourceware.cygnus.com
mailing list for the Kawa project.
Re: Kawa Code Formatting
- To: chris at bitmead dot com
- Subject: Re: Kawa Code Formatting
- From: Per Bothner <per at bothner dot com>
- Date: 14 Jun 2000 22:13:38 -0700
- Cc: "kawa at sourceware dot cygnus dot com" <kawa at sourceware dot cygnus dot com>
- References: <39485BDE.9393D44C@nimrod.itg.telecom.com.au>
Chris Bitmead <chrisb@nimrod.itg.telstra.com.au> writes:
> I was browsing the kawa code and I notice the fomatting re tabs and
> spaces doesn't seem consistent. The result is it looks a bit of a mess
> in my editor. It might be worth running the source through some sort of
> formatter.
It's consistent, from a Unix/Emacs point of view. I.e. tabs are
always 8 spaces, and Emacs generates a combination of tabs and
spaces to properly indent things. Kawa code will not indent
properly unless you have 8-character tab stops.
You can argue about this convention, but it is more-or-less
the standard convention for GNU code (i.e. a slight modification
of the GNU C/C++ convention to handle Java).
In my previous job we agreed on a different indentation convention,
but disagreed on use of tabs. It seems in the PC world, tabs
are a thing of user preference, and identation is one tab per level.
This is very different from the Unix world, where tabs are almost
always 8 spaces. (Of course Emacs can be programmed to do the
desired thing, and that is what we ended up doing. However, other
tools are a different matter, using using 8-space tabs makes things
very "wide".)
Another reason I'm loath to run Kawa code though a re-indenter
is that it makes it difficult to compare different versions
of a file.
I'm not absolutely opposed to changing the identation and tabbing
conventions used in Kawa - but as long as I'm still writing over
90% of the code, it doesn't seem to make much sense.
--
--Per Bothner
per@bothner.com http://www.bothner.com/~per/