river-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Brouwer <mark.brou...@cheiron.org>
Subject Re: svn commit: r583971 [1/3] - in /incubator/river/trunk/jtsk: ./ src/ src/com/artima/lookup/util/ src/com/sun/jini/example/browser/ src/com/sun/jini/example/hello/ src/configentry/ src/net/jini/lookup/
Date Sat, 13 Oct 2007 08:45:42 GMT
Frank Barnaby wrote:
> 
> On Oct 12, 2007, at 5:52 PM, Mark Brouwer wrote:
> 
>> But I'm afraid I don't understand the current formatting as well, as it
>> seems that indentations are always tabs now and with my current tab
>> setting of 8 this results in a different indentation from the java
>> files. As result of this a lot of stuff is beyond the 80 characters a
>> line which seemed to be a 'soft' rule.
> 
> I guess I misunderstood your initial message regarding the indentation.
> I thought you were suggesting tabs were preferred over the 2-space
> indentation, which was fine by me.  However, now that I've re-read your
> original message, I see that you were just referring to the inconsistency.

Sorry, to be so unclear at regular intervals due to verbiage.

> I'm not certain why the inconsistency was originally in there, but I
> would like to fix it to adhere to some "accepted" practice.  I also agree
> that the 80 char limit is important, but I didn't want to make unnecessary
> non white-space changes at that stage (ie, fix indenting, then fix 
> wrapping).
> I wanted to take advantage of the ignore-white-space diff option for these
> changes (ie, "svn diff -x -w" should show no changes).

:-) it was indeed hard to find out what had changed. I'm of the opinion 
that leading whitespace is significant, while trailing isn't. To keep a 
monitor on consistent formatting I would like therefore to see all 
changes in the code in a diff.

I also don't know how the svn commit records are produced, but it seems 
they take all whitespace into account.

> So, what would you suggest is the preferred indentation practice (ie,
> tabs, spaces, a mix)?  Is there a practice that is accepted by the
> entire community?  I suspect there's lots of opinions.

I hope everybody realizes it is you that started a new indentation and 
whitespace discussion :-)

The things I would like to see:

- all code in the River project should to be consistent
- an indentation of 4 characters
- no usage of tabs in the source files (except when escaped)
- best effort to keep within 80 characters, at least for java and
   xml files, most of the times this is possible. The html specs
   I think will be problamatic, given its origin.
- no outlining beyond the first level in files. As an example,
   the outlining in the Ant build files at the left hand side I think
   is good, beyond that is a time waister and will introduce additional
   diffs lines just for the sake of keeping attributes and brackets
   lined up properly

I think there has been enough argumentation by some of the more well
versed ASF people why in a collaborative projects spaces work better
than tabs.

Note that I also prefer tabs (the one that is 4 spaces), but as soon as
your code enters the territory of those who prefer 2 or 8 spaces (and
they are out there), your code looks like a mess to them. Watching Jini
and JDK code from within my own project is always frustrating, the Jini
code is actually pure beauty so lets make sure everybody can agree on
that one ...

BTW I think normalizing should take place after all patches in the field
have been integrated, no sooner. Probably around the same time as the
namespace change.
-- 
Mark

Mime
View raw message