comp.lang.ada
 help / color / mirror / Atom feed
From: Martin Krischik <krischik@users.sourceforge.net>
Subject: Re: containers and garbage collections.
Date: Sat, 13 Sep 2003 11:45:14 +0200
Date: 2003-09-13T11:45:14+02:00	[thread overview]
Message-ID: <23635057.dHrhOAZpeb@linux1.krischik.com> (raw)
In-Reply-To: u3cf15pjr.fsf@earthlink.net

Matthew Heaney wrote:

> Martin Krischik <krischik@users.sourceforge.net> writes:
 
> From the point of view of a user of the queue, the queue contains
> elements, of indefinite type Element_Type.  Clearly, inside the queue,
> access types are used, but that is an implementation detail hidden from
> client.

Yes, and this is what I am advocating. And more.

>> I also have created containers for "type Element (<>) is abstract tagged
>> private;" and I belive "type Element is array (Index range <>) of Item;"
>>is
>> possible as well (Enabling collection of Strings). Both can't be done
>>with
>> C++ templates - so we should not take the all mighty STL as an example.

> Both of these containers are possible using the single declaration:
> 
> generic
>    type Element_Type (<>) is private;
> package GP is ...;
> 
> You can instantiate GP using either of the types in your example.  It's
> not clear why you made two separate containers, one for tagged types
> vs. another for array types, as a single container seems adequate.

Will it work with any combination of tagged types incl. controled types any
derived types of Element_Type? If so I stay corrected and will rething my
design.

With Rwegards

Martin

-- 
mailto://krischik@users.sourceforge.net
http://www.ada.krischik.com




  reply	other threads:[~2003-09-13  9:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-12 15:32 containers and garbage collections Martin Krischik
2003-09-12 16:41 ` Stephen Leake
2003-09-13  9:37   ` Martin Krischik
2003-09-13  3:33 ` Matthew Heaney
2003-09-13  9:45   ` Martin Krischik [this message]
2003-09-13 17:10     ` Matthew Heaney
2003-09-15 13:47     ` Dmitry A. Kazakov
2003-09-15 23:11       ` Matthew Heaney
2003-09-16 17:59         ` Martin Krischik
replies disabled

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