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,5c9ae6c7b4ac5676 X-Google-Attributes: gid103376,public From: Ehud Lamm Subject: Re: Limiting inheritance Date: 2000/07/28 Message-ID: #1/1 X-Deja-AN: 651716557 References: <8lq7tj$5rt$1@nnrp1.deja.com> <7rk8e7b4dj.fsf@butter.albany.duck.com> Content-Type: TEXT/PLAIN; charset=US-ASCII X-Complaints-To: usenet@news.huji.ac.il X-Trace: news.huji.ac.il 964767845 3128 132.64.178.45 (28 Jul 2000 07:04:05 GMT) Organization: The Hebrew University of Jerusalem Mime-Version: 1.0 NNTP-Posting-Date: 28 Jul 2000 07:04:05 GMT Newsgroups: comp.lang.ada Date: 2000-07-28T07:04:05+00:00 List-Id: On Thu, 27 Jul 2000, Matthew J Heaney wrote: |> I can make the procedres 2 different names but if I go that route, I |> want to NOT inherit the procedure from the parent to the child. Is |> there a way to do this? | |If you don't want the derived type to inherit the operation from its |parent, then it sounds like the (parent) operation shouldn't be |primitive for the type. | In such cases I'd first think hard about the inheritance relationship between the types. If this is the case now, what about operations added later (during maint. perhaps, when it is easy to forget such design issues). Bad inheritance hierarchies are a pain, and it is very easy to arrive at almost unworable designs. Unless you have really good reasons (and you really know a lot about OO/inheritance), stick to the central uses of inheritance (e.g., subtype inheritance). Ehud Lamm mslamm@mscc.huji.ac.il http://purl.oclc.org/NET/ehudlamm <== My home on the web Check it out and subscribe to the E-List- for interesting essays and more!