I am Robert C. Martin (Uncle Bob). Ask me anything.

View original thread
Nope's photo

Dear Uncle Bob,

From what I understand, you define OO as disciplined indirect calls / inversion of control (e.g "when old code calls new code"). Which makes it a tool to manage dependencies (by strategically inverting some of them, you get to fully isolate some parts of your system from the others).

James Coplien's definition seems a lot more related to modeling the domain (the "real world" ?), and seems very tied to UI and more generally what the user "sees" or "manipulates" ; and seems not to apply to non-interactive programs like a webserver or a compiler. Also, there seem to be a lot more upfront design in the way he works, which makes it clear from the start that you are required to have a solid understanding of the domain.

We also have Alan Kay's definition of OO, which is more related to the "fire-and-forget" (unidirectional?) style communication between the different parts of the system ("message-oriented programming", from his own words).

To make the matter worse, we also have the "definition" that "OO is putting related data and functions together", which conveys almost no information (as we've been doing this for decades, as soon as we were able to split code into several files).

Are all these definitions different ways to see the same thing? Do they lead to the same architectures? Is it possible to reconcile them, and should we?

Thanks for your answer, and thanks for all the answers you already provided to our profession!