From: Florian Weimer <fw@deneb.enyo.de>
Subject: Re: Interfaces
Date: Mon, 16 May 2005 18:12:06 +0200
Date: 2005-05-16T18:12:06+02:00 [thread overview]
Message-ID: <87zmuv40bt.fsf@deneb.enyo.de> (raw)
In-Reply-To: 4288c54b_2@news.arcor-ip.de
* Georg Bauhaus:
> Florian Weimer wrote:
>
>> As far as I understand the Ada 200x spec, this subprogram declaration
>> overrides both versions of Foo, such that
>> Foo ((J1 (T_Obj));
>> Foo ((J2 (T_Obj));
>> invoke the same subprogram.
>
> IIUC, if J1 and J2 are interface types, then J1's Foo and J2's Foo
> can only be abstract subprograms or null subprograms. If null
> procedures, maybe they would be semantically the same anyway,
> in a library.
Sorry, maybe I should have expressed my thoughts more clearly.
Library 1 provides a Do_Something procedure like:
procedure Do_Something (Obj : in out J1; Param : String);
Do_Something invokes Foo on Obj.
Library 2 provides a completely different procedure, say
Do_Another_Thing, which also invokes Foo:
procedure Do_Another_Thing (Obj : J2; Result : out Natural);
T wants to implement both J1 and J2, but can only provide a single
implementation for Foo, which cannot suit both J1 and J2.
next prev parent reply other threads:[~2005-05-16 16:12 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-16 12:27 Interfaces Florian Weimer
2005-05-16 16:13 ` Interfaces Georg Bauhaus
2005-05-16 16:12 ` Florian Weimer [this message]
2005-05-16 18:59 ` Interfaces Robert A Duff
2005-05-16 19:27 ` Interfaces Florian Weimer
2005-05-16 20:09 ` Interfaces Robert A Duff
2005-05-16 20:44 ` Interfaces Florian Weimer
2005-05-17 6:14 ` Interfaces Vinzent 'Gadget' Hoefler
2005-05-17 10:53 ` Interfaces Florian Weimer
2005-05-17 13:34 ` Interfaces Vinzent 'Gadget' Hoefler
[not found] ` <4289f382$0$10805$afc38c87@>
2005-05-17 16:51 ` Interfaces Pascal Obry
[not found] ` <428a2832$0$10805$afc38c87@>
2005-05-17 18:15 ` Interfaces Pascal Obry
2005-05-17 21:11 ` Interfaces Florian Weimer
2005-05-18 10:36 ` Interfaces Georg Bauhaus
2005-05-17 7:36 ` Interfaces Dmitry A. Kazakov
2005-05-17 9:06 ` Interfaces Florian Weimer
2005-05-17 10:19 ` Interfaces Dmitry A. Kazakov
2005-05-17 10:57 ` Interfaces Florian Weimer
2005-05-17 11:13 ` Interfaces Dmitry A. Kazakov
2005-05-17 15:35 ` Interfaces Robert A Duff
2005-05-17 21:53 ` Interfaces Florian Weimer
2005-05-17 23:21 ` Interfaces Randy Brukardt
2005-05-17 23:44 ` Interfaces Marius Amado Alves
2005-05-18 7:53 ` Interfaces Dmitry A. Kazakov
2005-05-18 16:57 ` Interfaces adam
2005-05-20 5:31 ` Interfaces Matthew Heaney
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox