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,21960280f1d61e84 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!130.59.10.21.MISMATCH!kanaga.switch.ch!ezmp3.switch.ch!news-zh.switch.ch!switch.ch!cernne03.cern.ch!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: How come Ada isn't more popular? Date: Wed, 07 Feb 2007 08:54:58 +0100 Organization: CERN News Message-ID: References: <1169636785.504223.139630@j27g2000cwj.googlegroups.com> <45b8361a_5@news.bluewin.ch> <3pejpgfbki.fsf@hod.lan.m-e-leypold.de> <1ic9j6bmbl0ik.gvgqhl1ixvxk$.dlg@40tude.net> NNTP-Posting-Host: abpc10883.cern.ch Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: cernne03.cern.ch 1170834898 14413 137.138.37.241 (7 Feb 2007 07:54:58 GMT) X-Complaints-To: news@@cern.ch NNTP-Posting-Date: Wed, 7 Feb 2007 07:54:58 +0000 (UTC) User-Agent: Thunderbird 1.5.0.9 (X11/20061220) In-Reply-To: <1ic9j6bmbl0ik.gvgqhl1ixvxk$.dlg@40tude.net> Xref: g2news2.google.com comp.lang.ada:9056 Date: 2007-02-07T08:54:58+01:00 List-Id: Dmitry A. Kazakov wrote: >>> OK. What about refcounting with smart pointers? >> This form of GC actually works against your determinism goal. It simply is a >> poor form of GC, can't handle cycles, and has unpredictable execution times. > > Determinism /= time bounded. Bingo. > For handling cycles there are weak pointers. Not only. If you have cycles, then you'd better rethink the design. The difference is between a) graph treated as a mesh (or mess) of nodes which "own" each other and b) graph treated as a collection of nodes. The former might have ownership cycles between nodes, but not the latter, where ownership is an acyclic relation between graph and nodes. I agree that this kind of restructuring is not always possible, but for me it is conceptually cleaner and worth trying from the beginning. >> A "real" GC smoothes out the collection costs. > > Yes, garbage men won't come when you throw the bag out of the doors. They > will come tomorrow, or the day after tomorrow, or maybe never. But they > will send you the bill anyway... (:-)) :-) -- Maciej Sobczak : http://www.msobczak.com/ Programming : http://www.msobczak.com/prog/