Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!samsung!usc!apple!lsr From: lsr@Apple.COM (Larry Rosenstein) Newsgroups: comp.sys.mac.programmer Subject: Re: Multiple Inheritance -- Is It A Luxury? Message-ID: <9103@goofy.Apple.COM> Date: 12 Jul 90 01:22:29 GMT References: <8967@goofy.Apple.COM> <8968@goofy.Apple.COM> <5991@amiga.UUCP> Organization: Apple Computer, Inc. Lines: 38 In article <5991@amiga.UUCP> jimm@superman.UUCP (Jim Mackraz) writes: > >Traditionally? I thought part of Smalltalk was the browsing of class source >code, changing it as needed. That's the way Smalltalk has been traditionally, but even then some parts aren't available in source form. (I think that the number of such things in Smalltalk/V is even larger; for example their compiler.) >I think it's pretty clear that you can't extend a class by inheritance >in ways that were not anticipated by the author of the class. If the >"method" hooks you can override aren't in the right places, you are stuck. Then the class wasn't designed properly. In a well-designed class, each method does only 1 function, so it is easy override the function you need to change. On the other hand, if a method does 2 things and you need to override only one of them, then you have to re-implement something you shouldn't need to. >I expect that making profound changes in a subclass will often require the >source to the superclass, and almost as often only be feasible if you >can modify that source. I'm sure that you can always do this such that the class won't serve your needs. But in that case, you are outside the design center of the class. It's the same as extending any tool beyond its intended use. The challenge in designing a class is to make its applicability as broad as possible. There are class libraries on the market that ship in object code-only form. (The same as there are subroutine libraries that ship in object form.) It should be possible to find out whether source is a requirement for a class library. -- Larry Rosenstein, Object Specialist Apple Computer, Inc. 20525 Mariani Ave, MS 46-B Cupertino, CA 95014 AppleLink:Rosenstein1 domain:lsr@Apple.COM UUCP:{sun,voder,nsc,decwrl}!apple!lsr