From: bobduff@dsd.camb.inmet.com (Bob Duff)
Subject: Re: Ada 90 inheritance request?
Date: Thu, 22 Dec 1994 01:21:27 GMT
Date: 1994-12-22T01:21:27+00:00 [thread overview]
Message-ID: <D16uFr.E8I@inmet.camb.inmet.com> (raw)
In-Reply-To: JGOODSEN.94Dec19135859@treasure.radsoft.com
In article <JGOODSEN.94Dec19135859@treasure.radsoft.com>,
John Goodsen <jgoodsen@treasure.radsoft.com> wrote:
>In article <EACHUS.94Dec15184124@spectre.mitre.org> eachus@spectre.mitre.org (Robert I. Eachus) writes:
> type Needs_Finalization is new Controlled with...;
> -- overriding of Initialize/Adjust/Finalize
> procedure Initialize (Obj : in out Needs_Finalization);
> procedure Adjust (Obj : in out Needs_Finalization);
> procedure Finalize (Obj : in out Needs_Finalization);
>
> type Ctrl_T is new T with record
> NF: Needs_Finalization;
> end record;
>
>Maybe it's just me not seeing something here (which could be an indicator
>of the usability issues involved with addressing MI in Ada95), but where
>is the polymorphic behavior in the MI lattice? Wouldn't the above solution
>require me to delegate methods to the NF member of Ctrl_T (by hand)?
No. When an object is finalized, all of its components are finalized
automatically. If this weren't true, then finalization would be rather
badly broken -- any object that was a component of another object
wouldn't work right.
- Bob
--
Bob Duff bobduff@inmet.com
Oak Tree Software, Inc.
Ada 9X Mapping/Revision Team (Intermetrics, Inc.)
next prev parent reply other threads:[~1994-12-22 1:21 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-11-23 21:33 Ada 90 inheritance request? S M Ryan
1994-12-02 16:46 ` Tucker Taft
1994-12-09 17:26 ` Cyrille Comar
1994-12-11 18:47 ` Bob Duff
1994-12-12 3:15 ` Tucker Taft
1994-12-13 19:02 ` John Goodsen
1994-12-14 19:49 ` John Goodsen
1994-12-15 18:41 ` Robert I. Eachus
1994-12-19 18:58 ` John Goodsen
1994-12-20 10:40 ` Robert I. Eachus
1994-12-21 16:02 ` Norman H. Cohen
1994-12-22 1:21 ` Bob Duff [this message]
1994-12-17 13:55 ` 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