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,fd63afa4dc364b7e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-03-16 13:34:47 PST Path: supernews.google.com!sn-xit-02!supernews.com!news.gv.tsc.tdk.com!newsfeed.berkeley.edu!ucberkeley!newsfeed.cwix.com!sjc-peer.news.verio.net!news.verio.net!sea-read.news.verio.net.POSTED!not-for-mail Newsgroups: comp.lang.ada From: Brian Rogoff Subject: Re: Better support for garbage collection In-Reply-To: Message-ID: References: <98m938$2iod0$1@ID-25716.news.dfncis.de> <98pgs1$32up7$1@ID-25716.news.dfncis.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Date: Fri, 16 Mar 2001 16:59:21 GMT NNTP-Posting-Host: 206.184.139.136 X-Complaints-To: abuse@verio.net X-Trace: sea-read.news.verio.net 984761961 206.184.139.136 (Fri, 16 Mar 2001 16:59:21 GMT) NNTP-Posting-Date: Fri, 16 Mar 2001 16:59:21 GMT Organization: Verio Xref: supernews.google.com comp.lang.ada:5758 Date: 2001-03-16T16:59:21+00:00 List-Id: On Fri, 16 Mar 2001, Robert A Duff wrote: > "Nick Roberts" writes: > > I must say, I get the impression, although I don't understand it, that > > Robert, perhaps yourself, and a few others have an antipathy towards GC > > which is not entirely objective or rational. It is not a sound argument to > > say "Well, I don't want it, so nobody else does either." > > Well, I said in my previous post, "I too think it would be cool if GC > for Ada were widely available" -- I don't see how you can interpret that > as "antipathy". I think GC is a good idea in many situations. I also > think other memory management strategies are appropriate in other > situations. Robert also likes garbage collection, I believe. > > But Robert and I are both in the business of making Ada compilers, and > we don't see a lot of demand for GC. The cynic may counter that one doesn't see a lot of demand for Ada either. Of course that says nothing about GC. > Tucker, by the way, is rather down on GC. He thinks there must be some > better memory management approach yet to be invented (and we've > discussed some of his ideas along those lines). We'll see. I'd like to see some of those ideas. Tucker, care to elaborate? I think there will never be a single approach which will work well for all cases. Even amongst "GC-ed" language advocates, you can see that there is some realization that for embedded or hard real-time problems you may need other approaches. I'm thinking of the ML-Kit and it's region based memory manager, http://www.it-c.dk/research/mlkit/kit3/readme.html Still, I program in a GCed language now and I have to admit that my "programming velocity" is better than it was with Ada (yeah, I know, who cares, readability, blah, blah, blah :) and even if GC isn't the main reason it certainly helps. > Memory leaks are indeed annoying. GC can help a lot. But it doesn't > completely cure the problem -- you still have to use your brain when > writing programs. I've seen memory leaks in GC'ed programs. Static typing doesn't cure bugs either. > I've also seen GC'ed programs that are horribly slow because of > overreliance on GC. It's easy to get sloppy. It's easy to get sloppy in Ada and write programs that are much slower than C ones. How many times have people posted code in c.l.a. and made that same complaint? My worry about GC in Ada would be that the bugs caused by the interaction of GC and unsafe features would be difficult. I guess if you use unsafe features all bets are off in any case... -- Brian