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-Thread: 103376,12c1e4936587932e X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!news.in2p3.fr!in2p3.fr!news.ecp.fr!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: overriding in private part Date: Mon, 6 Oct 2008 18:32:06 -0500 Organization: Jacob's private Usenet server Message-ID: References: <45b4a4cc-13f5-4175-9061-9c962e32d762@64g2000hsm.googlegroups.com> <47e26a8d-d104-46c5-b841-667f6e556792@w7g2000hsa.googlegroups.com> <1vlrayvqx3imy.cp250cnppen5.dlg@40tude.net> <16aosnc43o0l2.1snh410eman0v$.dlg@40tude.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: jacob-sparre.dk 1223335936 3655 69.95.181.76 (6 Oct 2008 23:32:16 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Mon, 6 Oct 2008 23:32:16 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5512 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Xref: g2news1.google.com comp.lang.ada:2257 Date: 2008-10-06T18:32:06-05:00 List-Id: "Dmitry A. Kazakov" wrote in message news:16aosnc43o0l2.1snh410eman0v$.dlg@40tude.net... ... > As for me, I think that overriding could be a good default for all > subprograms with at least one controlling argument. Declarations of any > new > primitive operation should then be explicit: > > procedure Foo (X : Boo) is [abstract] new; -- I hate "overriding" > > Non-primitive operations should be made illegal if any of the arguments is > controlling: Yes, that would be the correct semantics if the language was being built from scratch. Unfortunately, the Ada 95 team decided to use the existing inheritance mechanism, and that isn't quite right. It's not so obvious until you try examples in various ways. In any case, non-primitive routines with specific tagged types are pretty suspicious and clearly deserve a warning. (There are a couple of them in Claw - mostly functions returning some specific tagged type, but the majority are class-wide.) Randy.