BT
x Your opinion matters! Please fill in the InfoQ Survey about your reading habits!

Object Oriented Programming: The Wrong Path?

by Dave West on Jul 12, 2010 |

"If you look back at where object orientation came from with Smalltalk-80 with message passing, and look at the current state of inheritance and things like that, have we gone down the wrong path?" This is the opening question of a QCon London 2010 interview with Joe Armstrong, the original developer of Erlang, and Ralph Johnson, long associated with Smalltalk, OOP, and Patterns. Both interviewees suggest that we have meandered down the "wrong path" but this is due to flaws in the implementation of object ideas and not the ideas themselves.  This is, in fact, Ralph Johnson's intial point:

One of the things that always happen when you get an idea and it comes out and it's too radical for most people. Most people don't adopt the whole thing, they take a piece of it and then you get this approximation.

Even Smalltalk, held by many to be the exemplar OO language, is seen as an approximation of object ideals.  Dr. Johnson suggests two specific issues with Smalltalk:

... I think Smalltalk made a fundamental error. I think it's hard for people who aren't Smalltalk programmers to appreciate this, but when you are programming in Smalltalk, when you are debugging in Smalltalk, you are debugging the whole system.

and

Because in Smalltalk you have everything in the image. You can't keep track of the versions between the old and the new one ... and there is also the issue of complexity. You build a system, so it gets to the limit of what a few people can do and there Smalltalk doesn't work too well.

The fact that everything (your application classes, development and debugging tools, and libraries) is in the 'image,' has always been an issue with Smalltalk, even for the language's most ardent admirers.  However this did not stop people from building very large, mission critical, systems - like the Cargill Lynx Project.  Lynx is a global grain trading system that supports over 1,500 users at 150 sites around the U.S. and has been in production for over a decade.  During its existence, Lynx has involved well over a hundred programmers, with full version control, and rubust testing and debugging.  Successful large systems, like the Lynx Project, do not allay Ralph Johnson's concerns, nor do they refute the premise that Smalltalk was a flawed implementation of object ideas; they merely add additional perspective.

The question of what set of characteristics made a language object-oriented was extensively, and emotionally, debated in the 1990's.  In the QCon London interview, Joe Armstrong's thesis advisor is quoted making a very similar argument:

I started wondering about what object oriented programming was and I thought Erlang wasn't object oriented, it was a functional programming language. Then, my thesis supervisor said "But you're wrong, Erlang is extremely object oriented". He said object oriented languages aren't object oriented. I might think, though I'm not quite sure if I believe this or not, but Erlang might be the only object oriented language because the 3 tenets of object oriented programming are that it's based on message passing, that you have isolation between objects and have polymorphism.

Dr. Armstrong indicates he is not entirely convinced by his advisor's arguments, but does seem to think that Erlang "might be the only object oriented language."  In addition to the three characteristics cited in the quote, single inheritance and dynamic typing were often cited as "absolute requirements" to be an OO language.

In the interview, both Dr. Johnson and Dr. Armstrong, seem to suggest that the object idea was and is an important one.  Dr. Armstrong spends his time pointing out how Erlang attempts to implement object ideas and OO language characteristics.  Dr. Johnson spends more time critiquing previous attempts at implementating object ideas, specifically Smalltalk.  While it might seem strange that a long-time advocate of Smalltalk and of objects (the Design Patterns book that Dr. Johnson co-authored includes object-oriented in its title), Ralph Johnson is not alone.

Dave Thomas is another person closely associated with objects and with Smalltalk.  His team created the first "Goodies Packs" for Digitalk's Methods (the first Smalltalk for the PC), he was founder and CEO of the company that created what was to become IBM's VisualAge Smalltalk, and his team developed the very popular programming tool, Eclipse (originally written in and for Smalltalk).  Dr. Thomas has been quoted saying, "Objects were a mistake," and "I am a stateful sinner."  These statements were made for dramatic effect, but also to point out "errors" in the Smalltalk implementation of object ideas - e.g. the focus on state, the lack of of good concurrency models in a class and image-based language, and the lack of focus on messaging.

Even Alan Kay who first coined the term "object-oriented" and who, with Dan Ingalls and others at Xerox PARC, created Smalltalk is critical. In a recent interview in Computerworld Australia

Dr. Kay noted:

I did make up this term (and it was a bad choice because it under-emphasized the more important idea of message sending). Part of the idea existed (in several systems). I could see that a more comprehensive basis could be made by going all the way to thinking of efficient whole virtual machines communicating only by messages. This would provide scaling, be a virtual version of what my research community, ARPA-IPTO [The Information Processing Techniques Office at the US Department of Defense's research facility] was starting to do with large scale networking, and also would have some powerful “algebraic” properties (like polymorphism). ... However, I am no big fan of Smalltalk either, even though it compares very favourably with most programming systems today (I don’t like any of them, and I don’t think any of them are suitable for the real programming problems of today, whether for systems or for end-users).

The recent flurry of criticism directed towards Smalltalk brings to mind the repeated aside in the lyrics of the old Coasters song, Charlie Brown: "(Why's everybody always pickin' on me)."  Johnson, Armstrong, Kay, and Thomas are not, of course, "pickin' on me (Smalltalk)."  implicit in the QCon London interview, and the other criticisms, is the question of to what degree can an idea that is "too radical for most people" (Dr. Johnson), be implemented in any programming language?

It is also possible that the object idea does not lend itself directly to the definition and structure of a programming language. In the Computerworld Australia interview, Dr. Kay also points out:

To me, one of the nice things about the semantics of real objects is that they are “real computers all the way down (RCATWD)” – this always retains the full ability to represent anything. The old way quickly gets to two things that aren’t computers – data and procedures – and all of a sudden the ability to defer optimizations and particular decisions in favour of behaviours has been lost. In other words, always having real objects always retains the ability to simulate anything you want, and to send it around the planet. ... And RCATWD also provides perfect protection in both directions. We can see this in the hardware model of the Internet (possibly the only real object-oriented system in working order). You get language extensibility almost for free by simply agreeing on conventions for the message forms. My thought in the 70s was that the Internet we were all working on alongside personal computing was a really good scalable design, and that we should make a virtual internet of virtual machines that could be cached by the hardware machines. It’s really too bad that this didn’t happen.

If 'real objects' are RCATWD, then each object could be implemented using the programming language most appropriate for its intrinsic nature, which would give new meaning to the phrase 'polyglot programming.' 

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Excessive interpretation by martraire cyrille

Thanks for drawing our attention on that interesting interview of Ralph Johnson and Joe Armstrong, which I enjoyed reading. However, except for the few excerpts taken out of context, I do not recognize what they discussed in your interpretation in this post.

I would suggest the readers to focus on the interview and draw their own conclusion.

Re: Excessive interpretation by Rafael de F. Ferreira

Indeed, sentences like:
However this did not stop people from building very large, mission critical, systems - like the Cargill Lynx Project. Lynx is a global grain trading system that supports over 1,500 users at 150 sites around the U.S. and has been in production for over a decade. During its existence, Lynx has involved well over a hundred programmers, with full version control, and rubust testing and debugging

have no place in an interview report unless they are literal quotes from the interviewees.

Very abstract by Ashutosh Singhal

Being an OO programmer and designer I was expecting details in the interview like what has gone wrong during the evolution of OO programming, but the article looks very abstract.

In todays programming world where most of the application is developed using OO based languages, saying that OO has gone in wrong path is a big probe unless detailed out.

Re: Very abstract by Luis Espinal

Being an OO programmer and designer I was expecting details in the interview like what has gone wrong during the evolution of OO programming, but the article looks very abstract.

In todays programming world where most of the application is developed using OO based languages, saying that OO has gone in wrong path is a big probe unless detailed out.


OO as implemented today has gone wrong a lot for the fact that the focus is more on class hierarchies than on messaging among objects. Besides, most of development done with OO languages barely qualify as OO systems. People are using OO languages to create what amount to be badly-written procedural systems.

So, in a way, OO has gone the wrong way because people to this date still don't know how to proper OOAD.

Generalizations of OOP by Alexandr Savinov

It is true that message passing is one of a few crucial constituents of OOP but the problem is that currently it is very difficult (I would even say almost impossible) to implement it in a simple and natural manner. There are also other mechanisms which are currently not supported in OOP like multi-threading or aspect-orientation. Therefore, OOP should be further developed and generalized. One such generalization is made within concept-oriented programming where concepts are used instead of classes and inclusion relation is used instead of inheritance.

OOP is dialectical all the way down by Tim Lee

I've often wondered why message passing is valued so highly by OOP enthusiasts. It may be an expression of the philosophical roots of OOP.

Kristen Nygaard founded OOP on the Marxist theory of dialectical materialism. In that frame of reference, reality is viewed as a social construct and the communication between people is a form of message passing. This primacy of consciousness orientation elevates the relations between people to a higher status than the relationship between an individual and the physical world.

Translated into the computer programming realm, message passing between imaginary objects would seem to a Marxist to be more politically correct than the procedural execution of instructions issued by an individual to a computer. In other words, there's a collectivism vs individualism issue involved that derives from the metaphysical world view implicit in OOP theory.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

6 Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT