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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,2843c5eea3415584 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: APQ Date: Wed, 22 Dec 2004 14:15:42 +0100 Organization: cbb software GmbH Message-ID: <1qdghglptbxd0.4agztqguu8nm.dlg@40tude.net> References: <1297625.Y25m4Ds50U@linux1.krischik.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: individual.net B7bxMQuCSMbgd93FGEmxwwn3WyF0wkq898CesVXwE76H0hr9A= User-Agent: 40tude_Dialog/2.0.12.1 Xref: g2news1.google.com comp.lang.ada:7155 Date: 2004-12-22T14:15:42+01:00 List-Id: On Wed, 22 Dec 2004 11:07:44 +0100, Martin Krischik wrote: > Warren W. Gay VE3WWG wrote: > >> I can't imagine it making a practical difference here, but >> perhaps I lack imagination on this point. > > http://en.wikibooks.org/wiki/Programming:Ada:Types:access#access_vs._access_all Pool-specific access types do not do well: 1. Upcast/downcast conversions do not work. You'll need Unchecked_Conversion of pointers. It is nasty and dangerous. 2. '[Unchecked_]Access does not work (otherwise, (1) would be a minor problem). 3. Rosen's trick does not work. Very bad. Move it to Initialize? That won't work either, because of 2. 4. Construction/destruction is headache. Wished to insert a newly created object into a list? Not from Initialize! To delete it from there upon destruction? Nay! 5. Access discriminants cannot be pool-specific. Converting to general access to specific one is again an Unchecked_Conversion of worst kind. 6. There is no way to restrict objects allocations to a definite set of pools. "type X (<>) is ..." does not count. In general, I think that the issue should be thoroughly reworked. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de