what it is, not everything should be pattern or anti pattern
the point is that you want to have a code-model which reflects the way your team (..., also architects and managers) thinks. If you are using many getters/setters, you might not be implementing a projection of the common shared model among your team but rather, you are building a model which is very technical and might completely diverge. This is dangerous because you will eventually spend a lot of time translating between models. On the other hand, getters and setters can be really useful and from what I've seen, the guy tries avoiding getters/setters using even more antipatterns (like when he suggested to add a print-function to the objects; that's bad because you want to separate print from your logic code)
Обсуждают сегодня