From: Simon Wright <simon@pushface.org>
Subject: Re: Specialization
Date: 31 May 2002 20:46:52 +0100
Date: 2002-05-31T20:46:52+01:00 [thread overview]
Message-ID: <x7vofewhzgz.fsf@pushface.org> (raw)
In-Reply-To: u1ybsla5f.fsf@gsfc.nasa.gov
Stephen Leake <stephen.a.leake.1@gsfc.nasa.gov> writes:
> One more: require the client to pass in a Finalize procedure:
>
> generic
> type Element is private;
> with procedure Finalize (Item : in out Element) is <>;
> package Foo is
> type Element_array is array (1 .. 10) of Element;
>
> procedure Empty (Item : in out Element_Array);
>
> end Foo;
>
> Now Empty can call Finalize on each element of the array. For
> non-controlled types, Finalize can be a null operation. This is the
> approach I use in SAL; it allows a generic package to be
> instantiated with the widest range of types.
I like this.
The Element probably has to be visibly (to the client) controlled, for
her to get hold of the Finalize.
next prev parent reply other threads:[~2002-05-31 19:46 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-30 12:39 Specialization Baugereau
2002-05-30 17:09 ` Specialization Ted Dennison
2002-05-30 17:29 ` Specialization Baugereau
2002-05-30 19:20 ` Specialization Stephen Leake
2002-05-30 19:48 ` Specialization Baugereau
2002-05-31 1:18 ` Specialization Jim Rogers
2002-05-31 5:41 ` Specialization Sergey Koshcheyev
2002-05-31 11:36 ` Specialization Baugereau
2002-05-31 14:08 ` Specialization Jim Rogers
2002-05-31 16:45 ` Specialization Hyman Rosen
2002-05-31 17:05 ` Specialization Sergey Koshcheyev
2002-05-31 17:40 ` Specialization Hyman Rosen
2002-05-31 20:04 ` Specialization Sergey Koshcheyev
2002-05-31 21:25 ` Specialization Hyman Rosen
2002-05-31 13:27 ` Specialization Stephen Leake
2002-05-31 19:46 ` Simon Wright [this message]
2002-06-01 15:30 ` Specialization Stephen Leake
2002-05-31 19:44 ` Specialization Simon Wright
2002-06-01 15:25 ` Specialization Stephen Leake
2002-06-01 17:12 ` Specialization Simon Wright
2002-06-01 19:50 ` Specialization Stephen Leake
2002-05-30 17:46 ` Specialization Toshitaka Kumano
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox