Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uunet!dino!ux1.cso.uiuc.edu!ux1.cso.uiuc.edu!m.cs.uiuc.edu!p.cs.uiuc.edu!johnson From: johnson@p.cs.uiuc.edu Newsgroups: comp.object Subject: Re: Evaluating "Object-Oriented" Progra Message-ID: <135300019@p.cs.uiuc.edu> Date: 9 Jan 90 01:29:50 GMT References: <638@ajpo.sei.cmu.edu> Lines: 56 Nf-ID: #R:ajpo.sei.cmu.edu:638:p.cs.uiuc.edu:135300019:000:2729 Nf-From: p.cs.uiuc.edu!johnson Jan 7 22:01:00 1990 I'm always happy to see a long article from Ed Berard, and this one is no exception. However, there were quite a few things that I disagreed with in this article. First, a matter of history. Simula was the first OOP language. It is true that Smalltalk advanced the state of the art quite a bit, and that most Americans learned of OOP because of Smalltalk, and that Smalltalk is quite a bit different from Simula. However, we should keep our history straight. In my opinion, the three major characteristics of an OOP language are 1. data abstraction 2. inheritance 3. polymorphism caused by late-binding of procedure calls I've never been able to understand why information hiding isn't just an aspect of data abstraction. I also think that data abstraction and abstract data types are synonyms, but maybe I'm just stupid. Note that 3) is broad enough to encompass CLOS generic functions and C++ virtual functions, and that class are nowhere mentioned. Ada falls down on both 2) and 3), because overloading is NOT late-binding nor, in my opinion, true polymorphism. I also take issue with the claim that Smalltalk is less polymorphic than ML. If you have a type system for Smalltalk, which I do, then you will see that Smalltalk programs can do all the tricks of ML, and then a bunch more. In fact, languages like Eiffel or Trellis/Owl have type systems that are as polymorphic as ML. The thing that is so great about ML is that it has a complete type inference algorithm, not that it is the end-all and be-all of polymorphism. In my opinion, type-checking is completely orthoganal to whether a language is OOP or not, and adding type-checking to Smalltalk does not make it more of an OOP language. Snorri Agnarsson said some good things about automatic memory management, all of which I support. It might be possible to think that he implied that memory management is a feature of object-oriented programming. Someone famous in the Smalltalk community (Dan Ingalls?) said this. However, I don't agree at all. Automatic garbage collection is wonderful, and it is especially useful in writing reusable code, but it is orthoganal to OOP. I also agree with the claim that Snorri (or someone else) made that late-binding is more important than inheritance. I think I've said that in public before. Of course, I wouldn't want to give up inheritance. If anybody wants a reference to my definition of OOP languages, I gave it in "Designing Reusable Classes" with Brian Foote in the 2 issue of the Journal of Object-Oriented Programming. (The June/July 88 issue, I think). I'll send copies of the paper to people who can't find copies of the journal. Ralph Johnson -- University of Illinois at Urbana-Champaign