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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,81bb2ce65a3240c3 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Received: by 10.68.236.170 with SMTP id uv10mr5439163pbc.4.1335429950254; Thu, 26 Apr 2012 01:45:50 -0700 (PDT) Path: r9ni100013pbh.0!nntp.google.com!news2.google.com!goblin1!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: What would you like in Ada202X? Date: Thu, 26 Apr 2012 10:44:39 +0200 Organization: cbb software GmbH Message-ID: References: <3637793.35.1335340026327.JavaMail.geo-discussion-forums@ynfi5> <9af5eaaa-1c48-4455-a8e8-39dd9ee8092d@ot8g2000pbb.googlegroups.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: FbOMkhMtVLVmu7IwBnt1tw.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Date: 2012-04-26T10:44:39+02:00 List-Id: On Thu, 26 Apr 2012 02:37:30 +0200, Yannick Duch�ne (Hibou57) wrote: > Le Thu, 26 Apr 2012 00:14:47 +0200, ytomino a �crit: > >> Delphi(or C#)'s method resolution clauses. >> >> Java-style interface introduced in Ada2005 makes primitive names to >> global. >> Method resolution clause restore them to local. >> >> type I1 is interface; >> procedure X (Obj : I1); >> type I2 is interface; >> procedure X (Obj : I2); >> >> type T is new I1 and I2; >> procedure X (Obj : T); -- conflicted!!! >> >> If method resolution clause exists: >> >> type T is new I1 and I2; >> overriding(I1.X) procedure X1 (Obj : T); I never liked prefix overriding. It would be much better: procedure X (...) is overriding; procedure X1 (...) is overriding I1.X; >> overriding(I2.X) procedure X2 (Obj : T); > > The above may still present issues with overloading. Imagine X exist with > multiple signatures, for both I1 and I2: as your proposal does not refer > the precise signature, this would still be ambiguous. So what? This problem already exists in Ada, it is a *different* problem. Look at renaming, for example. The proposal is about resolving conflicts by *existing* means. If Ada provided a better way to identify a procedure than by its fully qualified name + signature, that could be only welcome and would work here as well. My complaint has always been that Ada should finally take the policy that name conflicts shall be treated as errors if not explicitly resolved. That would nullify your example, because there will be no context with undistinguishable X. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de