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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Conflicting interfaces Date: Wed, 20 Aug 2014 09:21:22 +0200 Organization: cbb software GmbH Message-ID: <14p9kn2gv2i9b$.kjvlm04a3f1v$.dlg@40tude.net> References: Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: yj8+JIQUMOEawvIM7K49kA.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:21848 Date: 2014-08-20T09:21:22+02:00 List-Id: On Wed, 20 Aug 2014 04:21:56 +0300, Victor Porton wrote: > What to do if two interfaces (possibly by different vendors) incidentally > have a method with the same name and the same signature? > > For this situation we probably should (in Ada 202X) introduce some > "renaming" facility for interface methods. > > Or is it already in Ada 2012? I think that no. I don't think so. Additive multiple inheritance if this is what you mean is not there. The main application of additive MI is rather intentional duplication of operations and components. E.g. type List_Element is tagged record Previous : not null access List_Element'Class; Next : not null access List_Element'Class; end record; type Alarm_Event is new List_Element or List_Element with record ... end record; Inherits twice from the same list head in order to be able to participate in two lists: of alarms and of events. This would require operation and components renaming. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de