comp.lang.ada
 help / color / mirror / Atom feed
From: bobduff@world.std.com (Robert A Duff)
Subject: Re: Allocating "initialized" limited types...
Date: 1996/09/05
Date: 1996-09-05T00:00:00+00:00	[thread overview]
Message-ID: <Dx8Iz7.Jsu@world.std.com> (raw)
In-Reply-To: 1996Sep4.183415.17277@ocsystems.com


In article <1996Sep4.183415.17277@ocsystems.com>,
Joel VanLaven <jvl@ocsystems.com> 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




  reply	other threads:[~1996-09-05  0:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-08-30  0:00 Allocating "initialized" limited types Jon S Anthony
1996-08-31  0:00 ` Robert A Duff
1996-09-02  0:00   ` Jon S Anthony
1996-09-04  0:00     ` Joel VanLaven
1996-09-05  0:00       ` Robert A Duff [this message]
1996-09-06  0:00     ` Jon S Anthony
1996-09-02  0:00   ` Jon S Anthony
1996-09-03  0:00     ` Robert A Duff
1996-09-06  0:00     ` Jon S Anthony
1996-09-04  0:00   ` Jon S Anthony
1996-09-05  0:00     ` Robert A Duff
1996-09-05  0:00   ` Jon S Anthony
1996-09-05  0:00     ` Robert A Duff
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox