Nygaard and Dahl invented Simula’s classes and objects to master complex problems. Alan Kay invented object orientation (OO) with its networks of communicating objects to facilitate simple and powerful mental models. His goal was to make computers and programming comprehensible to children of all ages.
VIMEO 43536416 Trygve Reenskaug - Object Orientation Revisited. Simplicity and power with DCI.
I have extended Kay’s original OO with explicit concepts and code that specify how objects interact at runtime. With this new paradigm, Data-Context-Interaction (DCI), programmers reason about their code, new team members get quickly up to speed, maintainers lead a better and more productive life. The DCI Context is a new abstraction that supplements the ubiquitous class.
Mainstream programmers missed the importance of communication in Kay’s OO and misused the term. A better name for their approach is ‘class orientation’.
While a class says everything about the inside of an object and nothing about the objects surrounding it, a DCI Context says everything about a network of communicating objects and nothing about their insides.
The class is great for describing autonomous objects such as the domain objects in the Data part of DCI. The Context is great for describing how use cases are realized by networks of communicating objects. Communication is now a first-class citizen of programming.
.
Cunningham & Beck, 1987: We introduce a notation for diagramming the
message sending dialogue that takes place between
objects participating in an object-oriented
computation. Our representation takes a global point
of view which emphasizes the collaboration between
objects implementing the behavior of individuals.
We illustrate the diagram's usage with examples
drawn from the Smalltalk-80 virtual image. We
also describe a mechanism for construction
of diagrams from code. pdf
acm ![]()
.
Eric Elliott in "Forgotten History of OOP" is singing from a similar songbook. He suggests abandoning the name OOP and adopting in its place a name closer to Alan Kay's original intent: Message Oriented Programming. medium
Like JavaScript and Smalltalk before it, most modern OO languages are becoming more and more “multi-paradigm languages”. There is no reason to choose between functional programming and OOP. When we look at the historical essence of each, they are not only compatible, but complementary ideas.
Because they share so many features in common, I like to say that JavaScript is Smalltalk’s revenge on the world’s misunderstanding of OOP. Both Smalltalk and JavaScript support:
* Objects
* First-class functions and closures
* Dynamic types
* Late binding (functions/methods changeable at runtime)
* OOP without class inheritance
What is essential to OOP (according to Alan Kay)?
* Encapsulation
* Message passing
* Dynamic binding (the ability for the program to evolve/adapt at runtime)
What is non-essential?
* Classes
* Class inheritance
* Special treatment for objects/functions/data
* The new keyword
* Polymorphism
* Static types
* Recognizing a class as a “type”
If your background is Java or C#, you may be thinking static types and Polymorphism are essential ingredients, but Alan Kay preferred dealing with generic behaviors in algebraic form.