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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,34c2aa33b8bdb1a9 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-01-15 08:03:35 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!dispose.news.demon.net!demon!news-FFM2.ecrc.net!news.iks-jena.de!lutz From: lutz@iks-jena.de (Lutz Donnerhacke) Newsgroups: comp.lang.ada Subject: Re: Sugestion to Multiple Inheritance Date: Tue, 15 Jan 2002 16:03:25 +0000 (UTC) Organization: IKS GmbH Jena Message-ID: References: <3C444B8D.70309@mail.com> NNTP-Posting-Host: taranis.iks-jena.de X-Trace: branwen.iks-jena.de 1011110605 21105 217.17.192.37 (15 Jan 2002 16:03:25 GMT) X-Complaints-To: usenet@iks-jena.de NNTP-Posting-Date: Tue, 15 Jan 2002 16:03:25 +0000 (UTC) User-Agent: slrn/0.9.6.3 (Linux) Xref: archiver1.google.com comp.lang.ada:18934 Date: 2002-01-15T16:03:25+00:00 List-Id: * Hyman Rosen wrote: >Of course, in doing all this, you are doing pretty much >what a compiler that implements MI would be doing for you. Exactly. Matthew showed also the impact of multiple inheritance by duplicating the multiple included structure A. I'm pretty sure to find a way without MI. Simply by designing the whole type more carefully and use derivated packages. package Sorts is type Collection is tagged null record; procedure Sort (col : in out Collection); generic package Stable_Sorts type Stable_Collection is new Collection with null record; procedure Stable_Sort (col : in out Stable_Collection); end Stable_Sorts; end Sorts; Usage: generic with package S is new Sort; with package SS is new S.Stable_Sorts (<>); package Algorithm is procedure Do_That (col : in out Stable_Collection'Class); end Algorithm; ;-) Thanx.