Path: utzoo!attcan!uunet!bu.edu!snorkelwacker!apple!apple.com!rmh From: rmh@apple.com (Rick Holzgrafe) Newsgroups: comp.sys.mac.programmer Subject: Re: Multiple Inheritance -- Is It A Luxury? Message-ID: <9093@goofy.Apple.COM> Date: 11 Jul 90 21:07:40 GMT Sender: usenet@Apple.COM Organization: Apple Computer, Inc. Lines: 32 References:<8967@goofy.Apple.COM> <8968@goofy.Apple.COM> <5991@amiga.UUCP> In article <5991@amiga.UUCP> jimm@amiga.UUCP (Jim Mackraz) writes: > (Rick Holzgrafe) writes: > )Well, I like source too. But one of the best features of OOP is re-usable > )modules *without* having to hack the source. > > Traditionally? I thought part of Smalltalk was the browsing of class source > code, changing it as needed. > > 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. You're right, and it's why I said "I like source too". It's not easy to write a class so that all reasonable extensions can easily be made by subclassing. (I know; I've tried.) But that's the *goal* of OOP (well, one of them anyway :-). Easily sub-classable classes increase the productivity of the developers who use them. Try hard to write classes whose users won't need source. Then give them source anyway. ========================================================================== Rick Holzgrafe | {sun,voder,nsc,mtxinu,dual}!apple!rmh Software Engineer | AppleLink HOLZGRAFE1 rmh@apple.com Apple Computer, Inc. | "All opinions expressed are mine, and do 20525 Mariani Ave. MS: 77-A | not necessarily represent those of my Cupertino, CA 95014 | employer, Apple Computer Inc."