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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3ccb707f4c91a5f2 X-Google-Attributes: gid103376,public From: kilgallen@eisner.decus.org (Larry Kilgallen) Subject: Re: Invoking parental methods (was: Java vs Ada 95) Date: 1996/11/06 Message-ID: <1996Nov6.123559.1@eisner>#1/1 X-Deja-AN: 194905938 x-nntp-posting-host: eisner.decus.org references: <1996Nov5.112527.1@eisner> x-nntp-posting-user: KILGALLEN x-trace: 847301765/2900 organization: LJK Software newsgroups: comp.lang.ada Date: 1996-11-06T00:00:00+00:00 List-Id: In article , bobduff@world.std.com (Robert A Duff) writes: > In article <1996Nov5.112527.1@eisner>, > Larry Kilgallen wrote: >>My problem, again, is maintainability in the face of genealogy shifts. >>Since Ada 95 does not have a mechanism to do it with zero changes >>to the body in the fashion of Macintosh Object Pascal, I am hoping >>for 1. > > Use a convention where you always write: > > subtype Parent is Whatever; > type New_Type is new Parent ...; > > Always use the name Parent in your type conversions (as in > "Parent(Param.all)'Access"). Then you can change the parent by changing > one line to "subtype Parent is Something_Else;". No changes to the body > are needed. Thanks! I had not even dared hope to be able to do it in the specification !