<br><div class="gmail_quote">On Tue, Oct 27, 2009 at 1:09 PM, DM Smith <span dir="ltr"><<a href="mailto:dmsmith@crosswire.org">dmsmith@crosswire.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><br>
On Oct 27, 2009, at 8:32 AM, Manfred Bergmann wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi have a question about conventions.<br>
<br>
Java coding guideline is to have the brackets not in a new line.<br>
I've seen both in JSword but is it to have new line?<br>
</blockquote>
<br></div>
The JSword guideline is to have every { and } on a new line. This pre-existed my involvement.<br></blockquote><div><br>It's my fault.<br>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.<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Why are the instance variables declarations at the bottom?<br>
</blockquote>
<br></div>
This is another JSword style that was before I came to the project.<br>
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.<br>
Class constants should be at the top.<br>
<br>
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.<br></blockquote><div><br>This is my fault too, and as DM, does, I think I'd defend the practice for the same reasons.<br>
<br>Joe.<br><br></div></div>