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=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,be30d7bb9651853b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-12-21 17:21:27 PST Newsgroups: comp.lang.ada Path: nntp.gmd.de!Germany.EU.net!howland.reston.ans.net!gatech!news-feed-1.peachnet.edu!paperboy.wellfleet.com!noc.near.net!inmet!dsd!bobduff From: bobduff@dsd.camb.inmet.com (Bob Duff) Subject: Re: Ada 90 inheritance request? Message-ID: Sender: news@inmet.camb.inmet.com Organization: Intermetrics, Inc. References: Date: Thu, 22 Dec 1994 01:21:27 GMT Date: 1994-12-22T01:21:27+00:00 List-Id: In article , John Goodsen wrote: >In article 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.)