October 2023
Intermediate to advanced
384 pages
9h 12m
English
In the preceding chapter, we saw that the OO style of programming is strongly related to data types and the cohesion of data. But that’s not all there is to object orientation. Indeed, data cohesion may be secondary to another attribute of object orientation: polymorphism.
In Clean Architecture,1 I made the point that the OO style has three attributes: encapsulation, inheritance, and polymorphism. I then led you through the reasoning that, of the three, polymorphism is the most beneficial. The other two are, at best, ancillary.
1. Robert C. Martin, Clean Architecture (Pearson, 2017).
The examples in the previous ...
Read now
Unlock full access