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,b6e97963d32ee242 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-05-21 10:13:54 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "David C. Hoos" Newsgroups: comp.lang.ada Subject: Re: The old "Object.Method" syntax debate Date: Wed, 21 May 2003 12:13:51 -0500 Organization: Posted via Supernews, http://www.supernews.com Message-ID: References: <254c16a.0305210726.485125de@posting.google.com> <3ECBA778.4070909@crs4.it> X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Complaints-To: abuse@supernews.com Xref: archiver1.google.com comp.lang.ada:37602 Date: 2003-05-21T12:13:51-05:00 List-Id: "Preben Randhol" wrote in message news:slrnbcnb56.996.randhol+abuse@kiuk0152.chembio.ntnu.no... > Robert A Duff wrote: > > Jacob Sparre Andersen writes: > > > >> Will the change mean that currently legal programs will have to be > >> rewritten? > > > > No. The ARG is very concerned about compatibility, and would never make > > a change that would cause everybody to have to rewrite their Ada > > programs. > > But how is it done? > > I mean how can the compiler know that a procedure say: > > procedure Marry (Person : Man; Person2 : Woman); > > should be able to call like this: > > type Him : Man; > type Her : Woman; > > > Him.Marry (Her); > -- or > Her.Marry (Him); > > If I have understood the change suggested. > > Would it not make the language ambigous? It would not make the language ambiguous. Since Him and Her are objects of different types, each type would need its own version of the Marry procedure, unless they were both derived from a common ancestor type which had a class-wide Marry procedure. The two calls to such a class-wide procedure would not be ambiguous, any more than overloaded subprograms are ambiguous. The different subprogram profiles disambiguate the calls. > -- > Preben Randhol http://www.pvv.org/~randhol/ > _______________________________________________ > comp.lang.ada mailing list > comp.lang.ada@ada.eu.org > http://ada.eu.org/mailman/listinfo/comp.lang.ada >