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,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fa2cc518ef3b992c X-Google-Attributes: gid103376,public From: Laurent Guerby Subject: Re: tagged types extensions - language design question Date: 2000/01/27 Message-ID: <867lgvs47x.fsf@ppp-112-253.villette.club-internet.fr>#1/1 X-Deja-AN: 578429010 References: X-Trace: front2m.grolier.fr 949000861 5517 194.158.112.253 (27 Jan 2000 19:21:01 GMT) Organization: Club-Internet (France) NNTP-Posting-Date: 27 Jan 2000 19:21:01 GMT Newsgroups: comp.lang.ada Date: 2000-01-27T19:21:01+00:00 List-Id: "Vladimir Olensky" writes: > 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; What about: type T1_Private is private; type T1 is new T with record something_public : some_type; something_private : T1_Private; end record; private type T1_Private is record -- whatever... end record; > 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. Looks like it's easy to emulate, at least in the simple case you provided. > Regards, > Vladimir Olensky --LG