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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no 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!newsfeed01.sul.t-online.de!t-online.de!newsfeed.hanau.net!noris.net!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: How come Ada isn't more popular? Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH 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> Date: Thu, 8 Feb 2007 19:14:06 +0100 Message-ID: <1v9qweobb6xei.z5hdupxed63u.dlg@40tude.net> NNTP-Posting-Date: 08 Feb 2007 19:13:53 CET NNTP-Posting-Host: a96d8038.newsspool3.arcor-online.net X-Trace: DXC=4ZZ;@f1G3hM78PK[oJ2ng@McF=Q^Z^V3H4Fo<]lROoRAgUcjd<3m<;BDS4;jG_BEXJ[6LHn;2LCVN[J[UI?@ X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:9148 Date: 2007-02-08T19:13:53+01:00 List-Id: On Wed, 07 Feb 2007 08:54:58 +0100, Maciej Sobczak wrote: > Dmitry A. Kazakov wrote: > >> 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. I would say that in all cases all references within it should be non-controlled. The argumentation could go as follows: A controlled reference (subject of GC) expresses the life-time relation "not before me." [*] This relation is obviously transitive (due to nature of time). Ergo, there cannot be any cycles, per definition. >From this stand point I would claim that a cycle of controlled references manifests either a bug or a design problem. That a buggy program continues to function as-if there were no bug, barely should be attributed as an advantage of GC systems. ----------------- * One cannot say that the relation is "before or together with me," because nothing can happen simultaneous. Even if two [collection] actions A and B could happen concurrently, then A and B were independent, thus there could be no any time constraint between them. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de