logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacob Kjome" <h...@visi.com>
Subject Re: [v2] method order
Date Thu, 06 Dec 2012 18:25:23 GMT
On Thu, 6 Dec 2012 08:29:42 -0500
 Gary Gregory <garydgregory@gmail.com> wrote:
> Hi All:
> 
> I'd like to keep methods in alphabetical order in source files. Is that
> controversial for anyone? I know it makes for noisy commits so I would do
> it one file at a time when I run into it or in a whole batch. Thoughts?

I find this to be a bit pointless.  Someone in the future will surely commit 
out of order.  And I find method grouping to be more important.  For instance, 
if you've got a private method that does significant work for a particular 
public method, I usually co-locate the two without regard to alphabetical 
order.

On the other hand, I do generally alphabetize dumb javabean methods.  
Basically, I do it where it makes sense and don't worry about it where it 
doesn't or find it would be an otherwise unnecessary commit.

If you find classes where it makes sense to alphabetize, go for it.  But doing 
this for every class without regard to co-location of related methods is 
counterproductive, IMO.  For instance, for logger, I would order them by the 
level they represent - low to high - not alphabetically.  That is, trace, 
debug, info, etc...  But, ultimately, no matter what order they are, my IDE 
will allow me to find them so it doesn't matter that much in the end.  So why 
worry about it?


Jake

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message