Steve
2013-01-17 21:15:54 UTC
Hi,
I was at a JUG roundtable workshop last night where various code review
tools were being discussed.
The facilitator kept mentioning how the use of static methods made
automated code reviews more difficult and that he tried to minimize the
use of static functions.
I find static methods to be very convenient when the method doesn't need
stored ( in the class it belongs to ) values. Instead of having
to instantiate the object every time I want to use the method I just
have to type the class name and the method.
So, I would like to hear your opinion. When wouldn't I want to use
static methods aside from the obvious( the method depends on member
variable with changing values )
Steve
I was at a JUG roundtable workshop last night where various code review
tools were being discussed.
The facilitator kept mentioning how the use of static methods made
automated code reviews more difficult and that he tried to minimize the
use of static functions.
I find static methods to be very convenient when the method doesn't need
stored ( in the class it belongs to ) values. Instead of having
to instantiate the object every time I want to use the method I just
have to type the class name and the method.
So, I would like to hear your opinion. When wouldn't I want to use
static methods aside from the obvious( the method depends on member
variable with changing values )
Steve