I’d like to know whether, when I am coding a class, I should use getters and setters to access other instance variables (or just call them by their names). I think this creates unecessary noise, but I’d like to hear what you guys have to say about it.
Share
Code internal to the class can always access the private members without using the set and get methods for clarity that it is it’s own members in use. Just my 2 cents.
Also you can consider: http://codenaut.blogspot.com/2012/09/how-to-avoid-getter-and-setter-methods.html