Learning Objective-C 2.0: A Hands-on Guide to Objective-C for Mac and iOS Developers, Second Edition
by Robert Clair
D. The Fragile Base Class Problem
Many object-oriented languages suffer from what is called the fragile base class problem. If you add methods or instance variables to a class, you must recompile any classes that derive from the changed class. This is probably of no consequence for classes that you create in your own application code. Good practice requires that you make a clean compile before you release your program. But it is a problem for framework providers. For example, many of the classes in the Cocoa frameworks are intended to be subclassed. Imagine if you had to recompile all of your programs every time Apple wanted to change something in a Cocoa framework class. You (and everybody else) would also need fresh copies of any programs you ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access