This is the mail archive of the
kawa@sourceware.cygnus.com
mailing list for the Kawa project.
Re: Kawa Code Formatting
That's very interesting. I always wondered why I always have so much
indenting problems between editors. I use emacs myself, but never
realised this. (I have tabs set to 4).
I would have thought it sensible to either use tabs or spaces, either
one providing good formatting in other editors.
Per Bothner wrote:
>
> 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/
--
Chris Bitmead
mailto:chris@bitmead.com
http://www.techphoto.org - Photography News, Stuff that Matters