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,5c89acd494ea9116 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!storethat.news.telefonica.de!telefonica.de!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Self pointer in limited record 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: <1183577468.034566.57830@n60g2000hse.googlegroups.com> <1188578849.187422.280620@50g2000hsm.googlegroups.com> <9fy1xoukz1e3$.h574sqmiauri$.dlg@40tude.net> <1189441670.293887.176810@g4g2000hsf.googlegroups.com> Date: Thu, 13 Sep 2007 10:03:33 +0200 Message-ID: <16dbv6ehzvw3q.1ccv5mc0b5a2m.dlg@40tude.net> NNTP-Posting-Date: 13 Sep 2007 09:58:19 CEST NNTP-Posting-Host: 87aeaabf.newsspool4.arcor-online.net X-Trace: DXC=E9@71KVWOff:i=48;n?Z:`4IUKkgb=N67:gS\Z:d X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:1938 Date: 2007-09-13T09:58:19+02:00 List-Id: On Wed, 12 Sep 2007 16:57:05 -0500, Randy Brukardt wrote: > "Dmitry A. Kazakov" wrote in message > news:uffdiv96c9bc.6mn4qaig7owe.dlg@40tude.net... >> What happens when somebody would create some of these objects on the stack? > > Works fine -- that's the whole point of this design. When the objects get > finalized, the Claw code for Finalize unlinks them from their parent's list > of children (after destroying any children that they might have). No fuss, > no muss, quite cheap to do, and no dangling pointers. But then storage management should be made elsewhere, I mean, if children are only finalized but not deallocated. >> You argue for automatic collection, that is my point too. But I would go >> further and hide target objects behind handles to. That would eliminate >> "access." The language problem is though that there is no simple way to >> delegate operations from handle to the target object. It requires a lot of >> work. > > Not worth it, because you either lose extension or gain a second level of > tagged types for no real benefit. One benefit is GC (thought reference counting, for example), another is an ability to share object implementations (aliasing). Both add their problems too, of course. (:-)) BTW, are you going to port Claw to X11 anytime? (In the recent time I worked much with GTK+, what a mess!) -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de