From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-65-14.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-3.2 required=3.0 tests=BAYES_00,NICE_REPLY_A, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R.Carter" Newsgroups: comp.lang.ada Subject: Re: Calling inherited primitive operations in Ada Date: Thu, 1 Sep 2022 18:03:19 +0200 Organization: A noiseless patient Spider Message-ID: References: <67b32db0-c4db-466c-ac13-e597e008c762n@googlegroups.com> <401d6f59-2c28-4dd5-9fa6-fccf33b6d645n@googlegroups.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 1 Sep 2022 16:03:19 -0000 (UTC) Injection-Info: reader01.eternal-september.org; posting-host="45300621dee1fc91cb38e31b4cd7878a"; logging-data="2346982"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19g42gf+WH5zmv99cqBEO6yObfYeEUMq9o=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Cancel-Lock: sha1:iBPxASbuCIlUoy7Zn70XuO0fLtE= In-Reply-To: <401d6f59-2c28-4dd5-9fa6-fccf33b6d645n@googlegroups.com> Content-Language: en-US Xref: reader01.eternal-september.org comp.lang.ada:64258 List-Id: On 2022-09-01 16:10, Emmanuel Briot wrote: > I have seen quite a number of cases of needing the subtype like Dmitry was showing. In a small number of cases, those were actual bugs in GNAT, but most of the time the compiler was correct. > Mostly, you start to see the issue when you have generic packages that have formal generic packages. None of these deal with the example I responded to generic type T is ... package P is subtype Actual_T is T; > Reason: {AI05-0005-1} We always want either the actuals or the formals of an instance to be nameable from outside, but never both. This is true in all these examples. I have used Ada since 1984, and this has never been a problem for me (as initially presented, this would have existed in Ada 83). Of course, I generally avoid generic formal pkgs. They seem to me to be a work around for poor design, and I prefer to correct the design. -- Jeff Carter "[M]any were collected near them, ... to enjoy the sight of a dead young lady, nay, two dead young ladies, for it proved twice as fine as the first report." Persuasion 155