comp.lang.ada
 help / color / mirror / Atom feed
From: Ehud Lamm <mslamm@mscc.huji.ac.il>
Subject: Re: Limiting inheritance
Date: 2000/07/28
Date: 2000-07-28T07:04:05+00:00	[thread overview]
Message-ID: <Pine.A41.3.96-heb-2.07.1000728100031.89812A-100000@pluto.mscc.huji.ac.il> (raw)
In-Reply-To: 7rk8e7b4dj.fsf@butter.albany.duck.com

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!

 





  reply	other threads:[~2000-07-28  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-07-27  0:00 Limiting inheritance reason67
2000-07-27  0:00 ` Matthew J Heaney
2000-07-28  0:00   ` Ehud Lamm [this message]
2000-07-29  0:00 ` Robert I. Eachus
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox