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!feed.usenet.farm!feeder3.usenet.farm!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: Ada Annoyances Date: Tue, 4 Jul 2017 22:52:57 +0300 Organization: Tidorum Ltd Message-ID: References: <1ac5a44b-4423-443a-a7bb-2864d9abe78f@googlegroups.com> <4921bd4e-3827-a7ac-7f2d-d60edbc514a3@tidorum.invalid> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net XlRI9Sj/rwAhnzCpWCrS7gGjrtcc8cyGC/1BIWlLIOGVjLqse5 Cancel-Lock: sha1:DPNNQm9CIXXUKvc+1oMPKInTFf8= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 In-Reply-To: Xref: news.eternal-september.org comp.lang.ada:47288 Date: 2017-07-04T22:52:57+03:00 List-Id: On 17-07-03 23:39 , Robert A Duff wrote: > "Randy Brukardt" writes: > >> "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. > > In this fictional/future version of Ada, I presume the Tag of an object > could only change if it's a class-wide object. That was my intention, yes, apologies for not saying so, explicitly. > So you don't have to > finalize all tagged objects -- just class-wide ones, [snip] > Actually, not even that. Just every class-wide object that > uses this new feature. It would be known at the root of > the type hierarchy whether Tags can change. So there's no > distributed overhead. Good to hear. I will try to write up a 'Maximum_Size suggestion for ada-comment. May take a while, though. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .