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.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fa2cc518ef3b992c,start X-Google-Attributes: gid103376,public From: "Vladimir Olensky" Subject: tagged types extensions - language design question Date: 2000/01/27 Message-ID: #1/1 X-Deja-AN: 578325439 Organization: Posted via Supernews, http://www.supernews.com X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Newsgroups: comp.lang.ada X-Complaints-To: newsabuse@supernews.com Date: 2000-01-27T00:00:00+00:00 List-Id: The question is : Why in Ada it is not allowed to extend both public and private part of the tagged type at one step ( using kind of syntax as in the following example ): package P is type T is tagged private; type T1 is new T with record with private something: some_type; and record; private type T is tagged with record ID : Integer; end record; type T1 is new T with record thing : some_other_type; end record; end P; Instead I should do this in two steps. 1. to extend private part and then 2. to extend public part or vice versa. Due to that type T1 has inheritance_depth = 3 instead of inheritance_depth = 2. LRM (3.9.1) says: Every type extension is a tagged type, and is EITHER a record extension OR a private extension of some other tagged type. It would be interesting to know what were the reasons not to allow to have BOTH a record extension AND a private extension at the same time. Regards, Vladimir Olensky