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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!io.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Full view of a private partial view cannot be a subtype Date: Mon, 18 Dec 2017 16:47:49 -0600 Organization: JSA Research & Innovation Message-ID: References: <5b32a99e-04e5-4adb-8b42-88e485570641@googlegroups.com> <83982113-349e-4443-b457-e63d749ad42a@googlegroups.com> Injection-Date: Mon, 18 Dec 2017 22:47:50 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="20574"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader02.eternal-september.org comp.lang.ada:49525 Date: 2017-12-18T16:47:49-06:00 List-Id: "Dmitry A. Kazakov" wrote in message news:p16332$1rfb$1@gioia.aioe.org... > On 2017-12-17 16:26, Jere wrote: > >> my assertion is that: >> >> subtype Thing is Core_Pkg.Thing; >> >> procedure Do_Something(The_Thing : in out Thing) >> renames Core_Pkg.Do_Something; >> is easier to both maintain and read than: >> >> type Thing is new Core_Pkg.Thing with null record; >> procedure Do_Something(The_Thing : in out Thing); > > But these are two semantically different concepts. Ada's subtype declares > an equivalent type [it inherits everything from and exports everything to > the base]. Ada's new tagged type declares a new instance of a class. It > only inherits. > > I don't understand how can you exchange one for another. You can't really; they're very different concepts. The OP is showing a confusion, because the renames he wants is perfectly legal, assuming proper visibility. And if the items in question are private, then he is trying to make a privacy leak -- which the language will not make easy for obvious reasons. Randy/