comp.lang.ada
 help / color / mirror / Atom feed
From: ncohen@watson.ibm.com (Norman H. Cohen)
Subject: Re: OO Idiom: Interfaces for derived classes
Date: 1996/03/22
Date: 1996-03-22T00:00:00+00:00	[thread overview]
Message-ID: <4iumd6$113p@watnews1.watson.ibm.com> (raw)
In-Reply-To: 199603220939.KAA00777@email.enst.fr

In article <199603220939.KAA00777@email.enst.fr>, Jean-Pierre Rosen
<rosen@EMAIL.ENST.FR> writes: 

|> There are two views of derived classes. Suppose you are the provider of some
|> reusable software components, and you want to provide guarantee on your product.
|>
|> 1) The product as a whole is a hierarchy of classes (for example, a set of
|> widgets).  For design as well as for efficiency reasons, it makes sense to
|> have derived classes defined in child packages, and since it is YOUR
|> product, you don't mind derived classes accessing the parent's private part.
...
|>
|> 2) The product is a set of classes, that are INTENDED to be extended by the
|> user. The user should not do this in child packages, because you cannot
|> guarantee your product if the *user* accesses the private part of the
|> parent. Actually, the  guarantee would have a clause "guarantee is void if
|> classes are derived in child packages", similar to a TV set with a clause
|> "guarantee is void if the user opens the back pannel".

Yes, this is a very useful distinction.

--
Norman H. Cohen    ncohen@watson.ibm.com




  parent reply	other threads:[~1996-03-22  0:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-03-22  0:00 OO Idiom: Interfaces for derived classes Jean-Pierre Rosen
1996-03-22  0:00 ` Gerd Moellmann
1996-03-22  0:00 ` Norman H. Cohen [this message]
  -- strict thread matches above, loose matches on Subject: below --
1996-03-21  0:00 Gerd Moellmann
1996-03-21  0:00 ` Norman H. Cohen
1996-03-22  0:00   ` Gerd Moellmann
1996-03-22  0:00     ` Norman H. Cohen
replies disabled

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