harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leo Simons <m...@leosimons.com>
Subject Re: [dev-process] Coding Style Guide
Date Sat, 22 Oct 2005 08:42:53 GMT
On Fri, Oct 21, 2005 at 04:58:29PM +0200, David Tanzer wrote:
> I've just had a look at some C code from jchevm and BootJVM to compare 
> the coding style of both contributions. Both use coding styles which are
> quite common for C source code but they are slightly different, and I
> don't think that's good. We should really define a coding style guide
> before even more code is contributed.


"A Foolish Consistency is the Hobgoblin of Little Minds"

The most important thing with coding style guides is that they don't get
in the way of actual work or that discussing them turns into big flamewars
or anything like that. IMNSHO.

The rest IMHO.

The second most important thing is consistency on a file-by-file basis.

The third most important thing to note is that doing lots of reformatting
halfway through a project makes the diffs harder to read, so it *is*
something to do as early as possible.

> I'm not worried about Java code we write, because I assume everyone
> agrees to use the Java Coding Conventions from Sun [1] here.

Huh, what, no, not me :-). Well sometimes, depends on the project.

> Much of the
> development in Harmony is done in C at the moment, and we need a coding
> style guide here too.
> I once suggested to use the Java Coding Conventions in C and C++ code
> too [2] (at least where possible, and we'd have to extend them to cover
> pre-processor directives and other C/C++ specific things). We could also
> use a style like Archie Cobbs or Dan Lydick used in their contributions,
> but IMHO we should write it down and then stick to it.
> Mark Wielaard provided a link to the project policy of GNU Classpath 
> [3], I guess we could get some Ideas from this too.

I like the kaffe one too:



In any case, perhaps someone should just start a wiki page with some kind of
policy on it and everyone that doesn't like the policy can change it so that
what they're doing complies with that policy. See how it goes :-)



View raw message