comp.lang.ada
 help / color / mirror / Atom feed
From: Jim Rogers <jimmaureenrogers@worldnet.att.net>
Subject: Re: OO in Ada
Date: Sat, 05 Oct 2002 15:25:12 GMT
Date: 2002-10-05T15:25:12+00:00	[thread overview]
Message-ID: <3D9F0411.50704@worldnet.att.net> (raw)
In-Reply-To: anmih7$flqc1$1@ID-77047.news.dfncis.de

Dmitry A.Kazakov wrote:

> Jim Rogers wrote:
> 
> 
>>I disagree here. Ada does not give the illusion of multiple dispatch.
>>
> 
> Would "limited multiple dispatch" sound better?
> 
> 
>>An Ada subprogram can only be primitive to one type. That characteristic
>>is determined by the place in the source code where the subprogram
>>interface is defined.
>>
> 
> This is wrong. Technically you could do it, because type declaration areas 
> [before freezing point] may overlap:


I must again diagree. You are wrong. Section 3.9 paragraph 12 of the Ada
Reference Manual states:

"A given subprogram shall not be a dispatching operation of two or more distinct 
tagged types."



> 
> type A is tagged ...
> type B is tagged ...
> procedure Multiple_Dispatch (X : A; Y : B); -- Alas, compilation error


There is a compilation error. Look at what it says. Gnat 3.14p states
"operation can be dispatching in only one type."

This does not provide any for of multiple dispatch, limited or otherwise.





  reply	other threads:[~2002-10-05 15:25 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-04  2:14 OO in Ada Rick Duley
2002-10-04  2:55 ` Jim Rogers
2002-10-04 17:35   ` Hyman Rosen
2002-10-05  0:20     ` Jim Rogers
2002-10-05 23:38       ` Dmitry A.Kazakov
2002-10-05 15:25         ` Jim Rogers [this message]
2002-10-06 21:37           ` Dmitry A.Kazakov
2002-10-06  2:18       ` Hyman Rosen
2002-10-06  3:00         ` Jim Rogers
2002-10-08 21:08           ` Gisle Sælensminde
2002-10-04  3:37 ` Chad R. Meiners
2002-10-04  5:32 ` Simon Wright
2002-10-04  6:01 ` tmoran
2002-10-04 15:05 ` Matthew Heaney
2002-10-05  2:14 ` SteveD
2002-10-05  8:54   ` Preben Randhol
2002-10-07 14:10   ` Matthew Heaney
2002-10-07 19:52     ` Jeffrey Carter
2002-10-08 21:18     ` Dmitry A.Kazakov
2002-10-08  9:53 ` John McCabe
2002-10-08 15:37   ` Matthew Heaney
2002-10-08 16:47     ` Georg Bauhaus
2002-10-08 17:48       ` Matthew Heaney
2002-10-08 17:16     ` Warren W. Gay VE3WWG
2002-10-08 17:58       ` Matthew Heaney
2002-10-09 16:59         ` Warren W. Gay VE3WWG
2002-10-08 10:21 ` Preben Randhol
  -- strict thread matches above, loose matches on Subject: below --
1998-05-15  0:00 Gisle S{lensminde
replies disabled

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