Nice initiative. I agree with the proposal above. (two comments though...) 1, final variable / parameters. I have no strong opinion about this one. Usually I think less typing is good typing, but as I said...no strong opinion here. (I know that Joshua Bloch's Effective Java advocates 100% final variables...and maybe that should shut me up) 2, What I do have "strong" opinion about (as if you guys havent noticed ;) ) is the "lambda/anonymous function simulation" thingie...I think it really makes sense. (or maybe we should call it "SAM conversion simulation", Brian Goetz published this paper regarding SAM recently: www.wiki.jvmlangsummit.com/images/1/1e/2011_Goetz_Lambda.pdf)
// Roger On Sat, Jul 23, 2011 at 10:08 PM, Johnathan Meehan < [email protected]> wrote: > Hi all, > > Could we consolidate the discussion of coding standards in this thread? > Shouldn't take too long, and it would be nice for people to know what's > what from the outset. It would be great to be able to document it, and > provide formatters to help with contributions (as I think Emmanuel > suggested previously). > > For discussion below then are comments from the other thread, and a few > other things. > > - The base standard is defined by the "Code Conventions for Java" > document[1]. > > - Layout > Tabs: Use spaces, not tabs. > Tab Width: 4 > Column Width: 120 > > - General > Variables should be final where possible. > Parameters should be final. > > - Comments / Annotations > Types: All types should have reasonable Javadoc. > Methods: All methods should have reasonable Javadoc, with the exception > of accessors which retrieve and set only. > @author: should not be used. > > - Testing > New code requires reasonable tests; modified code must have reasonable > tests where not previously created. > > - Deviation > Deviation from the standards is permitted where it enhances > readability/maintainability. Roger gave a specific example; perhaps we > can reference this later. > > Thanks! > Johnathan > > > [1] http://www.oracle.com/technetwork/java/codeconvtoc-136057.html > > >
