Re:Kay on the Meaning of "Object-Oriented Programming"
by gnaritas on Tuesday June 07, 2011 @11:29AM
(#2629510)
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.
[ Parent
| on HN ]
Re:Kay on the Meaning of "Object-Oriented Programming"
by shasta on Tuesday June 07, 2011 @02:47PM
(#2630363)
But note that this is an argument for encapsulating data and not necessarily bundling it with methods as objects. You can hide data reps with functions.
Re:Kay on the Meaning of "Object-Oriented Programming"
by protomyth on Tuesday June 07, 2011 @12:01PM
(#2629648)
It also allows the substitution of internal data structures due to profiling / runtime usage of the data.