Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!psuvax1!brutus.cs.uiuc.edu!ginosko!uunet!zephyr.ens.tek.com!tekcrl!tekgvs!jans From: jans@tekgvs.LABS.TEK.COM (Jan Steinman) Newsgroups: comp.object Subject: Re: Inheritance is NOT Delagation (sic) Message-ID: <6148@tekgvs.LABS.TEK.COM> Date: 13 Oct 89 23:08:20 GMT Distribution: comp Organization: Tektronix Inc., Beaverton, Or. Lines: 28 This is somewhat ambiguous. How is "average depth" defined? 1) Do you mean the number of subclasses divided by the sum of their depths? That would be somewhat misleading, as the class chain "Object, Set, Dictionary, IdentityDictionary, MethodDictionary" would have an average depth of 2.5, but this does not address the usefulness and instance counts of each class. 2) If you mean the number of objects in the system divided by the sum of their depths, than I would suspect that Smalltalk-80, at least, is *much* deeper than 3, since instances tend to be of leafs, rather than of more abstract classes somewhere higher up. 3) If you mean the average height that an instance must go up the superclass chain at run time in order to locate a desired method, then 3 is too high, at least in Smalltalk. Most methods sent to a Smalltalk object are in it's own method dictionary. No, I don't have numbers right now. Case #1 and #2 numbers would be easy to obtain in a workspace for a given Smalltalk image. I think the Green Book discussion on the Smalltalk interpreter method cache has some numbers for #3. Jan Steinman - N7JDB Electronic Systems Laboratory Box 500, MS 50-370, Beaverton, OR 97077 (w)503/627-5881 (h)503/657-7703