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, MSGID_SHORT autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!ginosko!uunet!mcsun!mcvax!dik From: dik@cwi.nl (Dik T. Winter) Newsgroups: comp.lang.ada Subject: Re: Adding Multiple Inheritance (was: Modernizing Ada) Message-ID: <8469@boring.cwi.nl> Date: 15 Oct 89 01:16:06 GMT References: <8910132028.AA07013@helios.enea.se> <1989Oct14.121338.1316@paris.ics.uci.edu> Organization: CWI, Amsterdam List-Id: In article <1989Oct14.121338.1316@paris.ics.uci.edu> Ron Guilmette writes: I must be extremely dense, but what is wrong if we modify it as follows (and get proper Ada on the fly)? (Lines marked + are added; lines marked - are deleted.) - package type PT_1 is + generic package PT_1 is procedure FOO; end PT_1; - package type PT_2 is + generic package PT_2 is type PT_2_TYPE is private; private type PT_2_TYPE is ...; end PT_2; with PT_1, PT_2; - package type PT_3 is + generic package PT_3 is - inherit PT_1 as PART_1; + PART_1 is new PT_1; - inherit PT_1 as PART_2; + PART_2 is new PT_1; - inherit PT_2 as PART_3; + PART_3 is new PT_2; VAR : INTEGER; procedure MEMBER_PROC (I : INTEGER); end PT_3; + with PT3; procedure USE_THEM is begin - THREE_VAR : PT_3; + THREE_VAR is new PT_3; - WEIRD : PT_3.PART_3.PT_2_TYPE; -- private type + WEIRD : THREE_VAR.PART_3.PT_2_TYPE; ... THREE_VAR.VAR := 99; THREE_VAR.MEMBER_PROC (99); THREE_VAR.PART_2.FOO := 99; end USE_THEM; The only distinction is that THREE_VAR is not a variable, but a package. It is long ago that I did something with Simula-67, and also I do not follow closely the buzz-word discussion. In any case what this proposer attempted to get into Ada 9X is already possible in Ada 83, unless I am very obtuse indeed. -- dik t. winter, cwi, amsterdam, nederland INTERNET : dik@cwi.nl BITNET/EARN: dik@mcvax