From: Thomas Wolf <t_wolf@angelfire.com>
Subject: Re: Generic default parameters
Date: Mon, 13 May 2002 09:49:16 +0200
Date: 2002-05-13T09:49:16+02:00 [thread overview]
Message-ID: <MPG.17498e30e59b5b4898968e@news.ip-plus.net> (raw)
In-Reply-To: uvg9v1whq.fsf@gsfc.nasa.gov
stephen.a.leake.1@gsfc.nasa.gov wrote:
> Thomas Wolf <t_wolf@angelfire.com> writes:
>
> > 5. Linked to (3) above: some way to specify a storage pool that
> > is equal to whatever pool the compiler would use if no
> > "for Some_Access'Storage_Pool use ..." clause was present, i.e.
> > a generic way to refer to the standard storage pool of a type
> > without referring to the type.
[...]
> I think a cleaner solution to 5 is a standard name for the standard
> storage pool, combined with 3 (default object for "in out"). So we'd
> have:
>
> generic
> type Something is private;
> Pool : in out System.Storage_Pools.Root_Storage_Pool'Class :=
> System.Storage_Pools.Default_Storage_Pool;
> package X is
> type Some_Access is access all Something;
> for Some_Access'Storage_Pool use Pool;
>
> There may have to be more than one default storage pool; that may be
> why there is no standard name now.
Exactly. Every access type may have its own "standard" pool as far as I
can tell from the RM. Hence maybe something like your
System.Storage_Pools.Default_Storage_Pool, but it would need to be
treated specially: it'd have to denote not *one* particular pool,
but would have to denote depending on context *the* pool from the
set of all possible standard pools that would apply to a given access
type. Hmm... what about other uses of storage pools? It appears that
besides passing it around to finally assign it to some access type
with a representation clause one cannot do very much with a storage
pool, see RM 13.11(20).
While I still think something like that would be useful, I'm not sure
I like such a context dependent semantics...
--
-----------------------------------------------------------------
Thomas Wolf e-mail: t_wolf@angelfire.com
next prev parent reply other threads:[~2002-05-13 7:49 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-10 14:22 Generic default parameters Thomas Wolf
2002-05-10 16:38 ` Preben Randhol
2002-05-10 16:50 ` Marin David Condic
2002-05-11 9:29 ` Simon Wright
2002-05-13 15:03 ` Hyman Rosen
2002-05-11 12:28 ` Preben Randhol
2002-05-13 14:03 ` Marin David Condic
2002-05-13 14:49 ` Hyman Rosen
2002-05-10 19:04 ` Hyman Rosen
2002-05-11 12:23 ` Preben Randhol
2002-05-11 13:49 ` Larry Kilgallen
2002-05-13 14:06 ` Marin David Condic
2002-05-10 19:27 ` Randy Brukardt
2002-05-11 12:32 ` Preben Randhol
2002-05-10 22:14 ` Stephen Leake
2002-05-13 7:49 ` Thomas Wolf [this message]
2002-05-13 8:49 ` Dmitry A. Kazakov
2002-05-13 14:00 ` Stephen Leake
2002-05-13 15:21 ` Dmitry A. Kazakov
2002-05-13 16:42 ` Stephen Leake
2002-05-14 10:24 ` Dmitry A. Kazakov
2002-05-14 14:02 ` Stephen Leake
2002-05-15 10:08 ` Dmitry A. Kazakov
-- strict thread matches above, loose matches on Subject: below --
2002-05-14 4:57 Grein, Christoph
2002-05-14 10:23 ` Dmitry A. Kazakov
2002-05-14 11:03 Grein, Christoph
2002-05-14 12:01 ` Dmitry A. Kazakov
2002-05-14 14:05 ` Stephen Leake
2002-05-15 8:44 ` Dmitry A. Kazakov
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox