How much is Uncle Bob's definition of OO compatible with the mainstream definition?
Uncle Bob in his Clean Coders series mentions and gives solid arguments that OO is basically about sending messages and invertion of dependency. He says, whenever the flow of control in a program is opposed the flow of dependency to prevent, among others, a fan out problem(this can be done by "interfaces" (not necesarilly a programming language element, but rather a programming concept)), we are talking about OO.
Example: he mentions that the following program is a classic OO example, because we have an "interface" for putchar/getchar and they are polymorphicly implemented (they can read/write from any device, but the interface is the same).
void copy() {
int c;
while ((c = getchar()) != EOF) {
putchar(c);
}
}
My question is then, how much is this definition consistent and compatible with the "mainstream" definition of OO. My problem with this definition is, that thus OO feels more of a design pattern, or an essential rule of a thumb for designing software, rather than a programming paradigm per se. I mean - when we accept his definition, then OO has no downsides and it feels to be a natural part of designing programs independently of when the "oo" term got invented and popularized.
Also I have some small bonus question - how much authority does Uncle Bob (Robert C. Martin) in the programmign comunity have? I like the videos, but I know no programming authorities.
Aucun commentaire:
Enregistrer un commentaire