Solutions
- Objective-C has categories as well as non-fragile instance variables.
- Component Pascal deprecates superclass calls.
- Java allows inheritance to be prohibited by labeling the class declaration with the keyword "final". In the book Effective Java, author Joshua Bloch writes (in item 17) that programmers should "Design and document for inheritance or else prohibit it".
- C# and VB.NET like Java have "sealed" and "Not Inheritable" class declaration keywords to prohibit inheritance.
Read more about this topic: Fragile Base Class
Famous quotes containing the word solutions:
“Football strategy does not originate in a scrimmage: it is useless to expect solutions in a political compaign.”
—Walter Lippmann (18891974)
“Every man is in a state of conflict, owing to his attempt to reconcile himself and his relationship with life to his conception of harmony. This conflict makes his soul a battlefield, where the forces that wish this reconciliation fight those that do not and reject the alternative solutions they offer. Works of art are attempts to fight out this conflict in the imaginative world.”
—Rebecca West (18921983)
“Those great ideas which come to you in your sleep just before you awake in morning, those solutions to the worlds problems which, in the light of day, turn out to be duds of the puniest order, couldnt they be put to some use, after all?”
—Robert Benchley (18891945)