From: ncohen@watson.ibm.com (Norman H. Cohen)
Subject: Re: Type extension questions
Date: 1995/03/27
Date: 1995-03-27T00:00:00+00:00 [thread overview]
Message-ID: <3l6q0i$12kj@watnews1.watson.ibm.com> (raw)
In-Reply-To: 3l0frd$b9t@lang8.cs.nyu.edu
In article <3l0frd$b9t@lang8.cs.nyu.edu>, comar@cs.nyu.edu (Cyrille Comar)
writes:
|> koehnema@enuxsa.eas.asu.edu (Harry Koehnemann) writes:
...
|> : What I
|> : really want is private inheritance ala C++.
|>
|> Don't try to be too close to C++, this doesn't fit Ada's
|> model. "Private inheritance" is meaningless in Ada since "Private" is
|> a caracteristic of packages and inheritance a characteristic of types
No, there is a direct Ada analog to a C++ class with a private base
class, namely a private type implemented as a tagged derived type:
package Base_Type_Package is
type Base_Type is tagged ...;
...
end Base_Type_Package;
with Base_Type_Package;
package Derived_Type_Package is
type Derived_Type is private;
procedure Some_Operation (X: in out Derived_Type);
...
private
type Derived_Type is new Base_Type_Package.Base_Type with ...;
end Derived_Type_Package;
--
Norman H. Cohen ncohen@watson.ibm.com
next prev parent reply other threads:[~1995-03-27 0:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-03-22 0:25 Type extension questions Harry Koehnemann
1995-03-22 12:01 ` Robb Nebbe
1995-03-23 22:05 ` Harry Koehnemann
1995-03-25 6:59 ` Cyrille Comar
1995-03-25 7:13 ` Cyrille Comar
1995-03-27 0:00 ` Norman H. Cohen [this message]
1995-03-30 0:00 ` Cyrille Comar
1995-03-27 17:29 ` Harry Koehnemann
1995-03-27 20:26 ` Robert I. Eachus
1995-03-29 0:00 ` Harry Koehnemann
1995-03-27 20:37 ` Kennel
1995-03-23 22:03 ` Tucker Taft
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox