§ Getters

13 Apr 2015 | Anton Kril Tweet

Getters break encapsulation. Only Data Transfer Objects can use them.

Getters that return objects break the Law of Demeter: they expose the knowledge about the object’s dependencies to its clients and increase system coupling.