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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!gandalf.srv.welterde.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Ada Annoyances Date: Thu, 29 Jun 2017 19:50:11 -0500 Organization: JSA Research & Innovation Message-ID: References: <1ac5a44b-4423-443a-a7bb-2864d9abe78f@googlegroups.com><4921bd4e-3827-a7ac-7f2d-d60edbc514a3@tidorum.invalid> NNTP-Posting-Host: rrsoftware.com X-Trace: franka.jacob-sparre.dk 1498783812 21323 24.196.82.226 (30 Jun 2017 00:50:12 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 30 Jun 2017 00:50:12 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: news.eternal-september.org comp.lang.ada:47200 Date: 2017-06-29T19:50:11-05:00 List-Id: "Robert A Duff" wrote in message news:wcca84q5vq1.fsf@TheWorld.com... > Niklas Holsti writes: ... > I agree, I don't see a problem here. When Finalize is called, it > dispatches via the currrent Tag. Tags can't change in Ada, but if they > could it would still dispatch via the Tag value present when Finalize is > called. That's not the problem. The problem is knowing whether to call Finalize at all. The only solution I could see for the GNAT approach is to treat all tagged objects as controlled (using a null Finalize in cause the object isn't controlled). That's expensive. For a list-based approach (like the one Janus/Ada uses), I don't see any solution at all. Putting every tagged object on the finalization lists would be prohibitively expensive. Randy.