Getters & setters are a bad practice! Objects should ask each other to do something, not asking data and then do that “something” by themselves - this is the principle of "Tell, don't ask".
Share this post
Tell, don't ask
Share this post
Getters & setters are a bad practice! Objects should ask each other to do something, not asking data and then do that “something” by themselves - this is the principle of "Tell, don't ask".