From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,896d86ef3723978c X-Google-Attributes: gid103376,public From: nobody@REPLAY.COM (Anonymous) Subject: Re: maintenance of overriding subprograms Date: 1997/09/10 Message-ID: <199709101328.PAA21175@basement.replay.com>#1/1 X-Deja-AN: 271296978 References: <340C2EA5.B9F@gsfc.nasa.gov> X-001: Replay may or may not approve of the content of this posting X-002: Report misuse of this automated service to X-URL: http://www.replay.com/remailer/ Organization: Replay and Company UnLimited Mail-To-News-Contact: postmaster@nym.alias.net Newsgroups: comp.lang.ada Date: 1997-09-10T00:00:00+00:00 List-Id: <341065D7.4D41@gsfc.nasa.gov> <34145A2F.3659@pseserv3.fw.hac.com> On Tue, 9 Sep 1997 13:25:22 GMT, bobduff@world.std.com (Robert A Duff) wrote: > In article <34145A2F.3659@pseserv3.fw.hac.com>, > W. Wesley Groleau x4923 wrote: > >If your names are well-chosen, and your hierarchy well-designed, > >wouldn't it be unnecessary (except for the occasional extreme case) > >to hunt down a lot of other stuff to understand the item at hand? > > I don't think so. If I see: > > package P is > type T is new Some_Parent with ...; > procedure Foo(X: T); > private > ... > end P; > > How on Earth am I supposed to know about the 17 primitive operations of > type T? If Some_Parent is heavily used, then maybe I've memorized them, > but otherwise, I can either go look them up, or use a tool that collects > them for me. I prefer to have the latter, at least as an option. How are you supposed to know about all the inherited operations of type T? You aren't, and the tool you prefer will not be available when you need it (I know this from experience). Note that this is true even if Some_Parent is not tagged. Anyone who creates such code is not a software engineer, since the result violates the principle of locality and consists of highly coupled modules. > > >Conversely, if one has to study all the ancestors in great detail > >to do anything with a particular descendant, haven't we lost much of > >the reduced work alleged to be acheived by inheritance? > > Well, not really. For example, think of all those clients of the > *parent* type that happily use the derived type without even *knowing* > about it. > > It depends who's doing the "alleging", I guess. It ranges from "OOP is > a useful tool" to "OOP will cure all the world's ills". ;-) We've known for 30 years that high coupling among modules is bad. We've also known for long enough that inheritance creates highly coupled modules. Therefore, [conclusion left to the reader as an exercise]. Jeff Carter PGP:1024/440FBE21 My real e-mail address: ( carter @ innocon . com ) "Go and boil your bottom." Monty Python & the Holy Grail Posted with Spam Hater - see http://www.compulink.co.uk/~net-services/spam/