comp.lang.ada
 help / color / mirror / Atom feed
* Conflicting interfaces
@ 2014-08-20  1:21 Victor Porton
  2014-08-20  7:21 ` Dmitry A. Kazakov
  0 siblings, 1 reply; 2+ messages in thread
From: Victor Porton @ 2014-08-20  1:21 UTC (permalink / raw)


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.

-- 
Victor Porton - http://portonvictor.org


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Conflicting interfaces
  2014-08-20  1:21 Conflicting interfaces Victor Porton
@ 2014-08-20  7:21 ` Dmitry A. Kazakov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry A. Kazakov @ 2014-08-20  7:21 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-20  7:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-20  1:21 Conflicting interfaces Victor Porton
2014-08-20  7:21 ` Dmitry A. Kazakov

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