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,e80a1497a689d8a5 X-Google-Attributes: gid103376,public From: Wes Groleau Subject: Re: Ada GC (was Ammo-zilla) Date: 1999/11/04 Message-ID: <38218F00.11C60777@ftw.rsc.raytheon.com>#1/1 X-Deja-AN: 544381811 Content-Transfer-Encoding: 7bit References: <38120FAF.945ADD7D@hso.link.com> <7uutgd$87h$1@nnrp1.deja.com> <19991024.18033546@db3.max5.com> <38189268.43EB150F@mail.earthlink.net> <86ogdjtdwz.fsf@ppp-115-70.villette.club-internet.fr> <7vadsp$8q61@news.cis.okstate.edu> <1999Oct28.221910.1@eisner> <7vb3c4$8a21@news.cis.okstate.edu> <7vhg2n$7ht$1@nnrp1.deja.com> <7vkjea$b34$1@nnrp1.deja.com> <7vncgr$bpg$1@nnrp1.deja.com> <3820CF33.81C062E1@callnetuk.com> X-Accept-Language: en,es,fr,pt Content-Type: text/plain; charset=us-ascii X-Complaints-To: news@icg.raytheon.com X-Trace: bos-service2.ext.raytheon.com 941723449 151.168.144.162 (Thu, 04 Nov 1999 07:50:49 CST) Organization: Raytheon Company MIME-Version: 1.0 NNTP-Posting-Date: Thu, 04 Nov 1999 07:50:49 CST Newsgroups: comp.lang.ada Date: 1999-11-04T00:00:00+00:00 List-Id: > > This restriction could be done using language support for GC. > > Let's suppose that we have additional keyword TRACED > > that applied to the ACCESS TYPES controlled by GC. > > (This TRACED ACCESS TYPE could be bound > > to particular GC using standard Ada construct: > > for T'Storage_Pool use Ada.GC.GC_Name_Storage_Pool). > > > > When access type is declared to be traced compiler should > > not allow any unchecked conversions with that type in standard > > mode. > > In may allowed only using additional pragmas. > > Rather than introducing a new reserved word into the Ada syntax, I think > all that would be necessary would be for a new standard (abstract) pool > type to be defined, derived from Root_Storage_Pool, called > Root_Managed_Pool, say. Managed (garbage collecting) pools would all be > derived from this type. Good ideas, but seems to me (disclaimer: I am not a compiler expert, nor do I play one on Usenet) it would be quite a challenge for the compiler to reliably warn of misuse. Tracking dangerous operations applied directly to an access type is not hard, but what about unchecked conversions, address clauses, or other operations modifying or referencing the objects (or components of the objects) the access type points to? In Ada, access types are often used for dynamic data structures (lists, maps, graphs, stacks, etc.) which often contain nested access objects.