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=-0.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f7a9613bbc2bd8c9 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-13 00:49:19 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!supernews.com!194.159.246.34.MISMATCH!kibo.news.demon.net!demon!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!news.belwue.de!news.tesion.net!newsfeed-zh.ip-plus.net!news.ip-plus.net!not-for-mail From: Thomas Wolf Newsgroups: comp.lang.ada Subject: Re: Generic default parameters Date: Mon, 13 May 2002 09:49:16 +0200 Organization: --- Message-ID: References: Reply-To: t_wolf@angelfire.com NNTP-Posting-Host: pargate2.paranor.ch X-Trace: rex.ip-plus.net 1021276151 22983 195.65.4.190 (13 May 2002 07:49:11 GMT) X-Complaints-To: abuse@ip-plus.net NNTP-Posting-Date: Mon, 13 May 2002 07:49:11 +0000 (UTC) X-Newsreader: MicroPlanet Gravity v2.50 Xref: archiver1.google.com comp.lang.ada:23940 Date: 2002-05-13T09:49:16+02:00 List-Id: stephen.a.leake.1@gsfc.nasa.gov wrote: > Thomas Wolf 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