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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2866100c9a2b8ce7 X-Google-Attributes: gid103376,public From: leschkes@ferret.cig.mot.com (Scott Leschke) Subject: Re: Type conversion between access types (was: Free'ing extended types) Date: 1996/05/24 Message-ID: #1/1 X-Deja-AN: 156554991 references: <3183AC75.335C@ehs.ericsson.se> organization: Motorola Cellular Infrastructure Group newsgroups: comp.lang.ada Date: 1996-05-24T00:00:00+00:00 List-Id: bobduff@world.std.com (Robert A Duff) writes: [...] Some good stuff >The intention of having the "all" in the language was to allow >implementations to use clever representations for pool-specific access >types. For example, if you know that the storage pool is only 64 K >bytes, then you can use a 16-bit offset for a pool-specific access type, >because you know it always points into that pool. For a general access >type, however, you need a full pointer (say, 32 bits), because it can >point into any pool, and can point into the stack. Yeah, I saw this point made in the Rationale. >Another advantage of pool-specific access types is that you know you >can't erroneously deallocate from the wrong storage pool. >But in my programs, I almost always end up writing "all". I suggest >that you always use "all" for access-to-class-wide types, since you will >often need to do the conversions allowed by 4.6(13). I have noticed that in most of the code I've seen, all is used pretty liberally would makes me wonder about the benefit of making the distinction between pool and general accesss types myself. I have wondered if it may have been better to have the distinction go the other way if indeed a distinction was warranted (ie. general and non-pool based). -- Scott Leschke.........................email: leschkes@cig.mot.com Motorola, Inc............................ph: 847-632-2786 1501 W Shure Drive......................fax: 847-632-3145 Arlington Heights, IL 60004......mailstop: 1301