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,154942e4f1d1b8e9 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.megapath.net!news.megapath.net.POSTED!not-for-mail NNTP-Posting-Date: Fri, 09 Dec 2005 14:37:10 -0600 From: "Randy Brukardt" Newsgroups: comp.lang.ada References: <2852224.m2vuDFxfOX@linux1.krischik.com> Subject: Re: Dynamically tagged expression required Date: Fri, 9 Dec 2005 14:41:30 -0600 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4952.2800 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4952.2800 Message-ID: <3LqdnQjDOeBrdwTenZ2dnUVZ_tKdnZ2d@megapath.net> NNTP-Posting-Host: 64.32.209.38 X-Trace: sv3-OiZAFM+2g0ZdFS1qtSyh26xcKfKFy/oU5s0GQ3hqwcSFHEkRnPpxxZLTafo2XVhqAqqBJOsKot+awBI!0xcuwHk6MW/FOTi1d1n0H+i7k63VzKSVeFO9KlAqrioJZi3EMSCrKevmszOrag2A3jzB2Jvc1cZc!xLccT1o7mgJjPg== X-Complaints-To: abuse@megapath.net X-DMCA-Complaints-To: abuse@megapath.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news1.google.com comp.lang.ada:6800 Date: 2005-12-09T14:41:30-06:00 List-Id: "Robert A Duff" wrote in message news:wccirtygr41.fsf@shell01.TheWorld.com... ... > If you want to change the Tag of an object, you can't -- you have to use > access types, and allocate a new object with the new Tag you want. > In my experience, class-wide types nearly always require use > of access types and heap allocation. That's half right. Class-wide types nealry always require the use of access types somewhere. But you don't necessarily have to use heap allocation; the objects can be allocated on the stack, and 'Unchecked_Access used to create the access values. With proper use of controlled types, this can be completely safe, and much of the time, it is better than heap allocation for all of the normal reasons. For this to work, the access types have to have a fairly controlled usage (so that it is practical for Finalize to update them); it works best in a library. Claw works this way, for instance. Randy.