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.204.129.15 with SMTP id m15mr866234bks.2.1335455758192; Thu, 26 Apr 2012 08:55:58 -0700 (PDT) Path: h15ni168276bkw.0!nntp.google.com!news2.google.com!goblin3!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 17:55:46 +0200 Organization: cbb software GmbH Message-ID: <4ibi32i4j08c$.avcrmyx1c0eq$.dlg@40tude.net> References: <3637793.35.1335340026327.JavaMail.geo-discussion-forums@ynfi5> <9af5eaaa-1c48-4455-a8e8-39dd9ee8092d@ot8g2000pbb.googlegroups.com> <3324774.1793.1335453581565.JavaMail.geo-discussion-forums@yncc41> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: Gbl624r6iuNIccy3ASy5ag.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-26T17:55:46+02:00 List-Id: On Thu, 26 Apr 2012 08:19:41 -0700 (PDT), Adam Beneschan wrote: > On Wednesday, April 25, 2012 7:52:52 PM UTC-7, Randy Brukardt wrote: >> "Yannick Duch�ne (Hibou57)" wrote in message >> news:op.wdcj0snyule2fv@douda-yannick... >> ... >>>> If method resolution clause exists: >>>> >>>> type T is new I1 and I2; >>>> overriding(I1.X) procedure X1 (Obj : T); >>>> 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. >> >> Right; simple names are never enough. You always need the full profile, else >> you still have holes. Those holes were bad enough for pragmas that we dumped >> the entire mess and invented aspect specifications for Ada 2012. >> >> We actually considered something like this for Ada 2005, but decided it just >> goes too far. In part, that's because having such a problem suggests bad >> design somewhere: it should never be the case that you have two routines >> with the same name and profile that have different meanings. > > I'm not sure that's an indicator of bad design, in this case. It seems > quite plausible that the interface types, I1 and I2, were designed by > people who had nothing to do with each other, working on totally different > open-source projects; and it happened that they came up with the same name > and profile for one of their methods. It gets promptly forgotten that the idempotent model of inheritance is not the only one. It is absolutely legitimate to implement exactly same interface twice or more times under an additive model. As an example, consider the interface of a doubly linked list. type Request is new List and List; -- A request participates in two lists! The point is, a properly designed MI shall support *both* models in all possible combinations of. It is up to the programmer to choose the model in each concrete case. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de