DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
The Latest "Software Integration: The Intersection of APIs, Microservices, and Cloud-Based Systems" Trend Report
Get the report
  1. DZone
  2. Data Engineering
  3. Data
  4. Alan Kay Was Wrong (About Him Being Wrong)

Alan Kay Was Wrong (About Him Being Wrong)

Is the term ''object'' misleading in the world of OOP? Should it be considered something more akin to ''messaging''? It depends on which level you're working on.

Yegor Bugayenko user avatar by
Yegor Bugayenko
·
Dec. 13, 17 · Opinion
Like (11)
Save
Tweet
Share
11.04K Views

Join the DZone community and get the full member experience.

Join For Free

From time to time, someone asks me what I think about what Alan Kay, the father of OOP, the designer of Smalltalk (the first object-oriented language), said in 1998 about OOP. He literally said that the very term "object" was misleading, and that a more appropriate one would be "messaging." Here is what I think.

I believe that there are two orthogonal means of interaction between objects: messaging and composition. Let's say, we have a point and a canvas:

Point p = new Point(x, y);
Canvas canvas = new Canvas();


This is how messaging would look:

p.printTo(canvas);


The problem with messaging is that it keeps objects on the same level of abstraction. They communicate as equal and independent "modules," sending data messages to each other. Even though they look object-oriented, the entire communication pattern is very procedural. We try to encapsulate as much as we can inside a single object, but we inevitably still have to expose a lot of its data in order to be able to "connect" it with other objects.

We turn objects into "little computers," as some books refer to them. They expect data to come it, process the data, and return back some new data. The maintainability problem is not really solved with this approach — we still have to deal with a lot of data, remembering its semantic outside of the objects. In other words, there is no true encapsulation.

On the other hand, this is how composition would look instead:

Point p2 = new PrintedOn(p, canvas);


Every time we need objects to communicate, we create a bigger object that encapsulates more primitive ones, letting them interact inside. Of course, the data will also go from object to object, but that will happen inside a bigger object. We can even make the encapsulator and the encapsulatee "friends", as I suggested before, to make that interaction more transparent and avoid data exposure through getters or even printers.

Let me quote Alan Kay again:

The key in making great and growable systems is much more to design how its modules communicate rather than what their internal properties and behaviors should be.

It seems to me that he means modules, which are not objects. These are different things. Modules are elements of architecture, while objects are elements of design. These are two different levels. At the architecture level, we obviously need messages, and Kay's statement is perfectly correct. However, at the design level, we need composable structures to increase maintainability — and messaging is not what can help us achieve this goal.

Thus, I believe Alan Kay was right when he invented objects, called them objects, and gave their programming style the "object-oriented" title.

Object (computer science) Data (computing)

Published at DZone with permission of Yegor Bugayenko. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • What Is the Temporal Dead Zone In JavaScript?
  • A Beginner’s Guide To Styling CSS Forms
  • What To Know Before Implementing IIoT
  • Use Golang for Data Processing With Amazon Kinesis and AWS Lambda

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: