Fragile Base Class - Solutions

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:

    Science fiction writers foresee the inevitable, and although problems and catastrophes may be inevitable, solutions are not.
    Isaac Asimov (1920–1992)

    Football strategy does not originate in a scrimmage: it is useless to expect solutions in a political compaign.
    Walter Lippmann (1889–1974)

    The anorexic prefigures this culture in rather a poetic fashion by trying to keep it at bay. He refuses lack. He says: I lack nothing, therefore I shall not eat. With the overweight person, it is the opposite: he refuses fullness, repletion. He says, I lack everything, so I will eat anything at all. The anorexic staves off lack by emptiness, the overweight person staves off fullness by excess. Both are homeopathic final solutions, solutions by extermination.
    Jean Baudrillard (b. 1929)