[jsword-devel] coding conventions

Joe Walker joe at eireneh.com
Tue Oct 27 10:44:23 MST 2009


On Tue, Oct 27, 2009 at 1:09 PM, DM Smith <dmsmith at crosswire.org> wrote:

>
> On Oct 27, 2009, at 8:32 AM, Manfred Bergmann wrote:
>
>  Hi have a question about conventions.
>>
>> Java coding guideline is to have the brackets not in a new line.
>> I've seen both in JSword but is it to have new line?
>>
>
> The JSword guideline is to have every { and } on a new line. This
> pre-existed my involvement.
>

It's my fault.
My original thought was that { and } on new lines was more readable and that
the more compact version only made sense when we were restricted to 80x24.
I'm now of the opinion that the above might be true, however uniformity is
more important, so I'd now do that the more standard way.


>  Why are the instance variables declarations at the bottom?
>>
>
> This is another JSword style that was before I came to the project.
> The reasoning is that instance variables are typically private and as such
> are not something that should be "up front", but rather buried as an
> implementation detail.
> Class constants should be at the top.
>
> The general pattern is that constructors should be first, then public
> methods and classes, protected and package protected methods and classes and
> finally private methods and classes.
>

This is my fault too, and as DM, does, I think I'd defend the practice for
the same reasons.

Joe.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/jsword-devel/attachments/20091027/eba0b5df/attachment.html>


More information about the jsword-devel mailing list