The last bullet item on the top of page 52 states:
“If a class declares a designated initializer that is different from its superclass, the superclass’s designated initializer must be overridden to call the new designated initializer”.
I am wondering why this statement explicitly mentions this need only for the designated initializer of the superclass (rather than all initializers of the superclass). When we define a new class, shouldn’t we consider whether we need to override ALL initializers of its superclass, rather than just considering the need to override the designated initializer of the superclass? i.e., Can’t any of these inherited initializers be potentially called by a class’s clients, thus leaving the object in a partially un-initialized state (assuming that a default value of zero for the new class’s data members is not acceptable)?
This just seems like a specific instance of a more general rule: When implementing a new class, we should consider whether the behavior of any inherited method will be acceptable for the derived class, or whether instead the inherited method should be overridden.
What am I missing here? i.e., Why did this rule only mention the superclass’s designated initializer rather than all inherited initializers?
Thanks to all for your feedback!