comp.lang.ada
 help / color / mirror / Atom feed
From: "Gisle Sælensminde" <gisle@apal.ii.uib.no>
Subject: Re: OO in Ada
Date: 8 Oct 2002 21:08:44 GMT
Date: 2002-10-08T21:08:44+00:00	[thread overview]
Message-ID: <slrnaq6ias.plv.gisle@apal.ii.uib.no> (raw)
In-Reply-To: 3D9FA70C.1070407@worldnet.att.net

In article <3D9FA70C.1070407@worldnet.att.net>, Jim Rogers wrote:
>> 
>> Yes, but that subprogram can take multiple parameters of that type,
>> and when a call is made to that subprogram with arguments which are
>> classwide, they must all have the same dynamic type (which is then
>> used in the dispatch) or an exception results.
> 
> 
> You are correct. There is a little more that needs to be said about
> this.
> 
> Following is a quote from "Ada as a Second Language" 2nd Edition by
> Norman Cohen (Section 12.4.4.3)

Even you have the generic method approch in Ada, which could have 
supported multiple displatching. This ulike the message passing approch
(object.method() ), that syntactically prevents you from doing it.
As far as I can see there is no need for extra syntax for adding
multiple dispatching in Ada. You would however need a lot of additional
semantics, including how the right method should be selected, and a lot
of special cases that would have to defined semantics.I would guess 
that one reason that it is not in the standard, is that it would
add a lot of complexity to the standard, which again would have made it
harder to implement conforming compilers. 

Other languages, like Common Lisp, where the object system is known as 
CLOS does multiple dispatching this way.  

--
Gisle S�lensminde ( gisle@ii.uib.no )   

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going
to land, and it could be dangerous sitting under them as they fly
overhead. (from RFC 1925)



  reply	other threads:[~2002-10-08 21:08 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
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 [this message]
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