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-7-bit X-Google-Thread: 103376,c9a5d6b3975624e1 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-10-05 08:25:13 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!feed2.news.rcn.net!rcn!wn11feed!worldnet.att.net!bgtnsc04-news.ops.worldnet.att.net.POSTED!not-for-mail Message-ID: <3D9F0411.50704@worldnet.att.net> From: Jim Rogers User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.4) Gecko/20011128 Netscape6/6.2.1 X-Accept-Language: en-us MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: OO in Ada References: <3D9D02F3.9090600@worldnet.att.net> <1033752899.224298@master.nyc.kbcfp.com> <3D9E3018.8000403@worldnet.att.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Sat, 05 Oct 2002 15:25:12 GMT NNTP-Posting-Host: 12.86.35.202 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc04-news.ops.worldnet.att.net 1033831512 12.86.35.202 (Sat, 05 Oct 2002 15:25:12 GMT) NNTP-Posting-Date: Sat, 05 Oct 2002 15:25:12 GMT Organization: AT&T Worldnet Xref: archiver1.google.com comp.lang.ada:29536 Date: 2002-10-05T15:25:12+00:00 List-Id: 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.