Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!mit-eddie!bloom-beacon!eru!hagbard!sunic!news.funet.fi!tukki.jyu.fi!sakkinen From: sakkinen@tukki.jyu.fi (Markku Sakkinen) Newsgroups: comp.object Subject: Re: prototypes and degenerate cases Message-ID: <1990Sep18.041532.14401@tukki.jyu.fi> Date: 18 Sep 90 04:15:32 GMT References: <1990Sep16.083629.10936@tukki.jyu.fi> Reply-To: sakkinen@jytko.jyu.fi (Markku Sakkinen) Organization: University of Jyvaskyla, Finland Lines: 37 In article brucec@phoebus.phoebus.labs.tek.com (Bruce Cohen;;50-662;LP=A;) writes: >I don't have time just now to reply to Markku Sakkinen's posting in detail, >but I did want to make a few comments about areas where I think we're not >talking about quite the same things. [...] > >In article <1990Sep16.083629.10936@tukki.jyu.fi> sakkinen@tukki.jyu.fi (Markku Sakkinen) writes: >> [...] then the _behaviour_ >> can of course be changes by changing the parent pointer. >> But that does not magically remove the now superfluous instance variables >> from the object! If that is wanted, the object itself must somehow be >> modified just as in the class-based case. > >No, the data slots are also inherited, and need not be inherited from the >same object the behavior is inherited from. There is a good example of >just what I wanted to do that explains how data representation can be used >in Self, in the paper "Organizing Programs without Classes" by Ungar, >Chambers, Chang, and Holze, in the Self papers. In section 2.4, "Beyond >Representation Sharing", they show polygon and rectangle classes which have >different data representations but share the appropriate common behavior. I am sorry, but there seems to be a little confusion still. In a prototype-based system, "inheriting" a data slot from a parent object means _sharing_ it with the parent. Surely Bruce Cohen's intention was not that when a circle becomes a ellipse, it has to share all the instance variables of some prototype ellipse thenceforth. (I have not read the paper mentioned, but the above is obvious anyway.) BTW, you may have to wait a day or two yet for the continuation posting that I promised in the last one, but it's coming. 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)