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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e5eb8ca5dcea2827 X-Google-Attributes: gid103376,public From: Samuel Mize Subject: Re: Ada OO Mechanism Date: 1999/05/25 Message-ID: <7ieuja$5v9@news1.newsguy.com>#1/1 X-Deja-AN: 482030731 References: <7i05aq$rgl$1@news.orbitworld.net> <7i17gj$1u1k@news2.newsguy.com> <7icgkg$k4q$1@nnrp1.deja.com> <3749E9EC.2842436A@aasaa.ofe.org> <7id2eo$fag@drn.newsguy.com> <3749FF7D.F17CE16A@aasaa.ofe.org> <374AC676.F7AE0772@lmco.com> Organization: ImagiNet Communications, Ltd. User-Agent: tin/pre-1.4-981002 ("Phobia") (UNIX) (AIX/3-2) Newsgroups: comp.lang.ada Date: 1999-05-25T00:00:00+00:00 List-Id: Hyman Rosen wrote: > So you mean in Ada, I can write a dot(a,b) which will dispatch on > either a or b? Yes. Either can be controlling. If both are controlling, they both have to be of the same type (the same class in C++ terms). [uncompiled example] type A_Type is tagged with null record; -- All of these dispatch on A if it's a dispatching call procedure Operation_1 (A: A_Type; I: Integer); procedure Operation_2 (I: Integer; A: A_Type); procedure Operation_3 (A: A_Type; B: A_Type'Class); -- This dispatches on both parameters, so they have to match -- at run-time procedure Operation_4 (A: A_Type; B: B_Type); > Once again, I will ask for an example demonstrating this, where > something is more complicated to use in C++ generics than in Ada. > This will make you the fourth person I have asked for this type > of example, the others being Richard D. Riehle, Samuel Mize, and > Robert Dewar. None of the others have chosen to post such an > example. Not instantly. I did address this to the best of my ability in another message, just today. I'll grant that I don't have a code example handy, and I'll grant that I was repeating "conventional wisdom" from the group. Did you intend that paragraph to sound contentious? To my ear, at least, it has rather a "you're all liars, I'm naming names" sound to it -- I hope that isn't what you meant. Best, Sam Mize -- Samuel Mize -- smize@imagin.net (home email) -- Team Ada Fight Spam: see http://www.cauce.org/ \\\ Smert Spamonam