In a pure object-oriented world getters and setters is a terrible anti-pattern. ... In an object-oriented language there are no data structures, but only objects that expose behavior (not attributes/properties!) You may find more about them in Section 3.5 of Elegant Objects (my book about object-oriented programming).