Providing Backward Compatibility

The dynamic nature of Objective-C partially solves a problem known as the “fragile base class problem,” but it doesn’t solve it completely. The main issue in the fragile base class problem is that whenever an object’s interface changes, all objects that interact with the changed object need to be recompiled. With Objective-C, a recompile is only needed if the number or order of instance variables change, and usually only subclasses of the changed object need to be recompiled.

NOTE

More experienced programmers will recognize that this is an oversimplification of the issues and solutions involving the fragile base class problem. Many good articles are scattered across the Web that discuss this problem. Those interested ...

Get Cocoa® Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.