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,5606d8433901738c X-Google-Attributes: gid103376,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: Allocating "initialized" limited types... Date: 1996/09/05 Message-ID: #1/1 X-Deja-AN: 178586659 references: <1996Sep4.183415.17277@ocsystems.com> organization: The World Public Access UNIX, Brookline, MA newsgroups: comp.lang.ada Date: 1996-09-05T00:00:00+00:00 List-Id: In article <1996Sep4.183415.17277@ocsystems.com>, Joel VanLaven wrote: >type c is new t with record > rec:c_rec; >end record; > > This allows you to use the nice aggregate assignment features of Ada >without being stuck on the idea of tagged types as records, using: >obj_ref.rec:=c_rec'(a1,b1,...); This suggestion makes a lot of sense to me. T and C might be limited, but C_Rec might be non-limited, thus allowing aggregates. Ada's aggregates have this nice feature of preventing you from forgetting some componenents. (Especially when you have existing aggregates in your code, and you *add* a component to the type.) But with private extensions of private extensions of ... you don't even know what your parent's components are. This suggestion allows you to get the nice feature of aggregates for the one little extension part you know about, which seems nice. - Bob