O'Reilly logo

Swift Functional Programming - Second Edition by Dr. Fatih Nayebi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Inheritance

Inheritance is a relation between classes that makes it possible to define and implement a class based on other existing classes.

Also, inheritance helps code reusability and allows independent extensions of the original class (the super class) through public classes and interfaces. The relationship between classes through inheritance causes a hierarchy.

Inheritance inevitably minimizes the amount of rework when we need to add additional information and functionalities to an existing class, as we can use the class as the super class and subclass it to add new state information and behavior.

Moreover, when it is coupled with polymorphisms and dynamic binding, inheritance minimizes the amount of existing code that should be changed ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required