• By Richard Wild
  • ·
  • Posted 20 Mar 2018
Getters and Setters Considered Harmful

Java programmers habitually pepper their classes with “getters” and “setters,” and this practice is so ingrained that probably few ever question why they do so, or whether they should. Lately I have come think that it is better not to and I have begun avoiding it in the Java code that I write. In...