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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.36.249.73 with SMTP id l70mr1931522ith.27.1507541151173; Mon, 09 Oct 2017 02:25:51 -0700 (PDT) X-Received: by 10.157.81.139 with SMTP id y11mr125255otg.19.1507541151100; Mon, 09 Oct 2017 02:25:51 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!border2.nntp.ams1.giganews.com!nntp.giganews.com!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.am4!peer.am4.highwinds-media.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!l196no1037576itl.0!news-out.google.com!u132ni1557ita.0!nntp.google.com!l196no1037575itl.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 9 Oct 2017 02:25:50 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2003:c7:83ca:5ce1:b810:d607:396f:d15e; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf NNTP-Posting-Host: 2003:c7:83ca:5ce1:b810:d607:396f:d15e References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Bad influence of private part on what subprograms can be defined From: AdaMagica Injection-Date: Mon, 09 Oct 2017 09:25:51 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 2004 X-Received-Body-CRC: 925233300 Xref: news.eternal-september.org comp.lang.ada:48403 Date: 2017-10-09T02:25:50-07:00 List-Id: Dmitry is correct. The programmer of B has full control about how he is goi= ng to implement the type and its operations. There is not any surprise for = him about whether an operation would be overriding or not. If he doesn't wa= nt X to be overriding, he has to choose a different name. In the latter cas= e, a user of B will not see (will not be able to directly call) the inherit= ed operation although it exists. package B is type B_Type is tagged private; --procedure X (Object: B_Type); implicitly defined procedure Y (Object: B_Type); private type B_Type is new A.A_Type with null record; end; package body B is procedure Y (Object: B_Type) is begin X (Object); -- indirect call of inherited X end; end;