comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Conflicting interfaces
Date: Wed, 20 Aug 2014 09:21:22 +0200
Date: 2014-08-20T09:21:22+02:00	[thread overview]
Message-ID: <14p9kn2gv2i9b$.kjvlm04a3f1v$.dlg@40tude.net> (raw)
In-Reply-To: lt0t7l$1p6$1@speranza.aioe.org

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

      reply	other threads:[~2014-08-20  7:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-20  1:21 Conflicting interfaces Victor Porton
2014-08-20  7:21 ` Dmitry A. Kazakov [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox