From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,c9a5d6b3975624e1 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-10-08 14:08:44 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!uio.no!nntp.uib.no!not-for-mail From: Gisle =?iso-8859-1?Q?S=E6lensminde?= Newsgroups: comp.lang.ada Subject: Re: OO in Ada Date: 8 Oct 2002 21:08:44 GMT Organization: Institutt for Informatikk, UiB Message-ID: References: <3D9D02F3.9090600@worldnet.att.net> <1033752899.224298@master.nyc.kbcfp.com> <3D9E3018.8000403@worldnet.att.net> <3D9FA70C.1070407@worldnet.att.net> NNTP-Posting-Host: apal.ii.uib.no Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: toralf.uib.no 1034111324 3508 129.177.16.7 (8 Oct 2002 21:08:44 GMT) X-Complaints-To: abuse@uib.no NNTP-Posting-Date: 8 Oct 2002 21:08:44 GMT User-Agent: slrn/0.9.7.2 (SunOS) Xref: archiver1.google.com comp.lang.ada:29600 Date: 2002-10-08T21:08:44+00:00 List-Id: 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)