Xref: utzoo comp.lang.c++:11993 comp.object:2641 comp.lang.objective-c:187 Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!uunet!hsi!stpstn!cox From: cox@stpstn.UUCP (Brad Cox) Newsgroups: comp.lang.c++,comp.object,comp.lang.objective-c Subject: Re: Static typing and OOP efficiency Message-ID: <6504@stpstn.UUCP> Date: 3 Mar 91 17:14:29 GMT References: <1991Feb16.121825.15353@gpu.utcs.utoronto.ca> <27BFDF44.3EA6@tct.uucp> <27C523A2.2155@tct.uucp> Reply-To: cox@stpstn.UUCP (Brad Cox) Organization: Stepstone Lines: 22 In article pcg@cs.aber.ac.uk (Piercarlo Grandi) writes: >As to dynamic overloading, C++ has an advantage in that it has manifest >types with bounded runtime overloading, while Objective C has latent >types with unbounded runtime overloading. This means that C++ can use >double indirection into vtbls, where Objective C has to use hash tables >or caching, hinting, and the like. Objective-C uses a central messager routine. This routine is replaceable and customizable by any user. Objective-C does not *have* to use hash tables, caching, etc. These are merely space optimization techniques that can be changed by any user. At one point we actually supported three different versions, one that optimizes space (linear lookup), another speed (precisely the same as C++'s vtbl idea), and one that puts an upper bound on space and speed. We finally settled on the latter specifically to overcome the geometrical growth in space with inheritance depth of the vtbl scheme. -- Brad Cox; cox@stepstone.com; CI$ 71230,647; 203 426 1875 The Stepstone Corporation; 75 Glen Road; Sandy Hook CT 06482