"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.'