Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!wuarchive!udel!rochester!kodak!uupsi!sunic!news.funet.fi!tukki.jyu.fi!sakkinen From: sakkinen@tukki.jyu.fi (Markku Sakkinen) Newsgroups: comp.object Subject: Re: Void references Message-ID: <1990Nov16.065609.15460@tukki.jyu.fi> Date: 16 Nov 90 06:56:09 GMT References: <454@eiffel.UUCP> <1990Nov15.011702.25087@Neon.Stanford.EDU> <11113@pt.cs.cmu.edu> Reply-To: sakkinen@jytko.jyu.fi (Markku Sakkinen) Organization: University of Jyvaskyla, Finland Lines: 36 In article <11113@pt.cs.cmu.edu> ddean@rain.andrew.cmu.edu (Drew Dean) writes: >From a relative neophyte, Keep on asking these questions! I suppose that the object-oriented people (like many others) live under a small but constant threat of "the emperor's new clothes" (H.C. Andersen). > if a subclass only inherits parts of its superclass >(ie. some subset of the methods and/or variables), how can an instance >of the subclass be used anywhere an instance of the superclass can be used ? >In my (comparably primitive) understanding of OOP, this is important. Without >this property, what good are abstract classes, which seem to be a useful >organizational tool ? Such partial inheritance can only be used for inheriting implementation (what I called "incidental inheritance" in my ECOOP'89 paper), thus more typically with concrete than abstract superclasses. An instance of the subclass can _not_ be substituted for an instance of the superclass. In my opinion, inheriting only parts of superclass, say C, into a subclass, say D, is a highly dubious idea even for this purpose. One should rather have defined a fully-fledged class B containing those parts first, then both C and D as subclasses of B. It would be nice to have the kind of generalisation facilities that Claus Pedersen suggested in his OOPSLA'89 paper: that one could derive _super_classes approximately as easily as existing languages allow us to derive _sub_classes. Markku Sakkinen Department of Computer Science and Information Systems University of Jyvaskyla (a's with umlauts) Seminaarinkatu 15 SF-40100 Jyvaskyla (umlauts again) Finland SAKKINEN@FINJYU.bitnet (alternative network address)