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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,19140af19dfa6e01 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-09-11 14:21:22 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn13feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi_feed4!attbi.com!sccrnsc02.POSTED!not-for-mail Message-ID: <3F60E747.40805@attbi.com> From: "Robert I. Eachus" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ada 0Y plans for garbage collection? References: <1127954.kcBZz6amlf@linux1.krischik.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 24.34.139.183 X-Complaints-To: abuse@comcast.net X-Trace: sccrnsc02 1063315281 24.34.139.183 (Thu, 11 Sep 2003 21:21:21 GMT) NNTP-Posting-Date: Thu, 11 Sep 2003 21:21:21 GMT Organization: Comcast Online Date: Thu, 11 Sep 2003 21:21:21 GMT Xref: archiver1.google.com comp.lang.ada:42389 Date: 2003-09-11T21:21:21+00:00 List-Id: Martin Krischik wrote: >>I still think the way it was done in Modula-3 gives you the best of >>both worlds. If you want garbage collection, you allocate from a >>different pool. If you don't want it you don't use it, and there is no >>overhead. > > Well, you can have this allready at least with GNAT. See > http://www.ada.krischik.com for details. Exactly. And if you read the documentation there, you eventually conclude that a garbage collected pool for Ada implementations may seem like a good thing, but it creates more issues than it solves. It can be done, and it has been done. But in practice building reference counts into types which need garbage collection gives you much better control over finalization. And yes, I know that there are general graph structures where reference counts don't work. I also know that in practice most such general graphs can be constructed with structural pointers and general pointers so that the structural pointers define a tree and nodes not in the tree should be reclaimed. You could say that doing that is a lot of extra work. It is a lot of work. But in the cases where I have run into this issue, the graph partitioning was part of a proof of correctness that I really needed to be able to do anyway. (Note that this is a proof of correctness of the algorithm to be implemented, before I ever got to writing code.) -- Robert I. Eachus "As far as I'm concerned, war always means failure." -- Jacques Chirac, President of France "As far as France is concerned, you're right." -- Rush Limbaugh