3 ms·
It's bad, in the sense that it leads you to write tightly coupled code that depends on it. The whole point of objects are to hide data and instead expose behav
by gnaritas 15y ago
It's bad, in the sense that it leads you to write tightly coupled code that depends on it. The whole point of objects are to hide data and instead expose behavior so other code is coupled to the objects behavior rather than its internal implementation on a specific set of chosen data. This leaves you free to fiddle with the internal implementation without breaking the external API, which leads to modular loosely coupled code.