Xref: utzoo comp.lang.smalltalk:466 comp.lang.c++:798 Path: utzoo!utgpu!water!watmath!clyde!rutgers!gatech!bloom-beacon!mit-eddie!ll-xn!ames!pasteur!ucbvax!ulysses!hector!jss From: jss@hector.UUCP (Jerry Schwarz) Newsgroups: comp.lang.smalltalk,comp.lang.c++ Subject: Re: Object Orientation and The Truth Message-ID: <10085@ulysses.homer.nj.att.com> Date: 16 Feb 88 16:02:12 GMT References: <2792@pitt.UUCP> <10077@ulysses.homer.nj.att.com> <209@ritcv.UUCP> Sender: netnews@ulysses.homer.nj.att.com Reply-To: jss@hector (Jerry Schwarz) Organization: AT&T Bell Labs, Murray Hill Lines: 50 In article <209@ritcv.UUCP> mjl@ritcv.UUCP (Michael Lutz) writes: >In article <10077@ulysses.homer.nj.att.com> jss@hector (Jerry Schwarz) writes: >> >>Inheritance is just about the only major feature that Smalltalk and >>C++ have in common. > >Not true -- unless you consider data encapsulation and multiple objects >of the same abstract type as "minor" (I certainly don't). Ada and >Modula provide the former, but few languages provide the latter. In >any event, these are orthogonal to (and as important as) inheritance. > I will rephrase my observation: Inheritance is the major feature that distinguishes "object-oriented" Smalltalk and C++ from other languages such as CLU, ML, Ada, Modula-2, ... that support notions of user defined types. I consider data encapsulation a very important aspect of programming, and both languages support it to some extent. But the static types of C++ are so different from the dynamic types of Smalltalk that I don't believe it is fair to say that they share data encapsulation features. As for "multiple objects of the same abstract type" I can't imagine a language that has a notion of user defined type that doesn't support multiple things (objects or values) of a type. In C++ the "assignment operator" does value copy, while the assignment of Smalltalk is pointer copy. While, each of these can be used to simulate the other, they are so different that it is hard for me to say that C++ and Smalltalk even share a notion of abstract type. >For the record: Peter Wegner presented a paper at OOPSLA 87 which gave >a taxonomy of various forms of "objectness". Worth a read, as it >does try to provide consistent terminology. Thanks for the pointer. He certainly supports my observation. I quote An object-based language is object-oriented if its objects belong to classes and class hierarchies may be incrementally defined by an inheritance mechanism. That is: object-oriented = objects + classes + inheritance I think he's wrong in one respect. If there were an applicative language that supported inheritance, I would bet that "object-oriented" enthusiasts would call it one of theirs. Jerry Schwarz