Information Hiding - Relation To Object-oriented Programming

Relation To Object-oriented Programming

The authors of Design Patterns discuss the tension between inheritance and encapsulation at length and state that in their experience, designers overuse inheritance (Gang of Four 1995:20). The danger is stated as follows:

"Because inheritance exposes a subclass to details of its parent's implementation, it's often said that 'inheritance breaks encapsulation'". (Gang of Four 1995:19)

Read more about this topic:  Information Hiding

Famous quotes containing the words relation to, relation and/or programming:

    Science is the language of the temporal world; love is that of the spiritual world. Man, indeed, describes more than he explains; while the angelic spirit sees and understands. Science saddens man; love enraptures the angel; science is still seeking, love has found. Man judges of nature in relation to itself; the angelic spirit judges of it in relation to heaven. In short to the spirits everything speaks.
    HonorĂ© De Balzac (1799–1850)

    Concord is just as idiotic as ever in relation to the spirits and their knockings. Most people here believe in a spiritual world ... in spirits which the very bullfrogs in our meadows would blackball. Their evil genius is seeing how low it can degrade them. The hooting of owls, the croaking of frogs, is celestial wisdom in comparison.
    Henry David Thoreau (1817–1862)

    If there is a price to pay for the privilege of spending the early years of child rearing in the driver’s seat, it is our reluctance, our inability, to tolerate being demoted to the backseat. Spurred by our success in programming our children during the preschool years, we may find it difficult to forgo in later states the level of control that once afforded us so much satisfaction.
    Melinda M. Marshall (20th century)