Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!lll-winken!unixhub!shelby!neon!craig From: craig@Neon.Stanford.EDU (Craig D. Chambers) Newsgroups: comp.object Subject: Re: Examples of Multiple Inheritance? Keywords: multiple inheritance Message-ID: <1990Dec17.223306.25756@Neon.Stanford.EDU> Date: 17 Dec 90 22:33:06 GMT References: <18090@neptune.inf.ethz.ch> <1990Dec13.035418.28040@Neon.Stanford.EDU> <47353@apple.Apple.COM> Organization: Stanford University Lines: 30 In article <47353@apple.Apple.COM> lins@Apple.COM (Chuck Lins) writes: >In article <1990Dec13.035418.28040@Neon.Stanford.EDU> craig@Neon.Stanford.EDU (Craig D. Chambers) writes: >>If you're concerned about space overheads of MI, other implementations >>of MI than the one in C++ 2.0+ have low space overheads, comparable to >>pre-MI C++ implementations (i.e. a word or two extra per object). > >Could you provide some examples or references to papers describing such >implementations? For some of us this (oo research) is a part-time endeavor >and we don't always have the time to read every single paper. (Our limits, >not yours.) Thanks in advance. Languages based on separate hash tables for message lookup (like Self, Smalltalk, many Lisp-based systems, Trellis/Owl, and (I think) Eiffel) can use one extra word in the beginning of the object to identify the object's run-time type. This could either be a pointer to a class object, an invisible map object as in Self, or a table of defined methods. No extra words per object are needed. C++'s MI implementation is designed to trade away some space per object to get faster message lookup (although in-line caching may be faster than this implementation when the cache hits, especially when combined with customization). I think the Smalltalk Blue Book [Golberg & Robson '83] might talk about this representation towards the back, and the Self implementation is summarized in OOPSLA'89. As far as I know, Trellis[/Owl]'s implementation has only been described in unpublished documents. I don't know if Eiffel's implementation is described anywhere. -- Craig Chambers