Well, notice that, while our Adolescent class, which provided its own convenience initializer, retained access to all of the Adult class’s initializers, because NestLeaver provides a designated initializer, it unceremoniously loses access to all of Adult’s initializers. To tie in the metaphor: just as most grown-ups cannot readily expect ongoing assistance from their …
When I have trouble grasping a seemingly difficult topic, what I like to do is find a real-world situation or circumstance to help me conceptualize it. To that end, I’ve come up with a metaphor encapsulating how class initializers work, specifically in the case of inheritance.
…s. And while these methods are indeed useful, and many times preferable to the use of initializers, I’m the kind of person who feels that things aren’t quite right so long as I remain confused about a basic element of a larger topic. The fact is, everybody will have to use initializers at some point in their Swift programming lives. It’s better to understand what you’re doing than it is to rely on Xcode to fix the problem, or to forego initializers in situations where they genuinely are the best solution simply because they’re painful to wrap your head around.
Understand that when starting a new diet, exercise routine, or productivity method, you will not be thinking with the same “cool head” you have when you are planning it. When it comes time to execute your plan, you will be tired, you will be tempted and you will want to take the easy way out. In those situations, you must have a pre-commitment that no matter how tired or tempted you are, you will stick to your goal.