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!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: about inheritance of subtypes and entities (such as constants) related to a type in the same package Date: Thu, 31 May 2018 10:44:04 +0200 Organization: Aioe.org NNTP Server Message-ID: References: NNTP-Posting-Host: MyFhHs417jM9AgzRpXn7yg.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 X-Notice: Filtered by postfilter v. 0.8.3 Content-Language: en-US Xref: reader02.eternal-september.org comp.lang.ada:52801 Date: 2018-05-31T10:44:04+02:00 List-Id: On 2018-05-30 09:59 PM, Randy Brukardt wrote: > "Dmitry A. Kazakov" wrote in message > news:pemv0i$1clu$1@gioia.aioe.org... > ... >> I don't see any commonality. One method produces an independent type >> another does a related types. If you mean specifically inheritance of >> operations and the representation, that plays no role because of the >> difference in the types. > > The OP was asking specifically why subtypes and objects aren't inherited, so > it surely plays a role in answering him. Why should subtypes be inherited? The question itself does not make sense. A type cannot be inherited it is not a property of a type. [*] I still see no relation. Ada subtype is a mechanism to produce an equivalent type. It is fully orthogonal to other forms of inheritance. > The difference in the definition of > the types is irrelevant in how inheritance of other things is defined. One > can argue that was wrong, but it is a fact. Relevant is that no definition of inheritance in the mechanism A can break the mechanism B as they produce different types. ------------------- * It could be of the there were type-valued types (types type) + inheritance from these 2nd-order types. Then a value (1st-order type) of a 2nd-order type could be inherited, but that would have nothing to do with inheritance from 1st-order types. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de