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!mx02.eternal-september.org!feeder.eternal-september.org!gegeweb.org!news.ecp.fr!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Ada package registry? Date: Mon, 8 Feb 2016 17:02:18 -0600 Organization: JSA Research & Innovation Message-ID: References: <02241ec4-0f95-4f63-9abc-092f167eb59e@googlegroups.com> <56af17b7$0$301$14726298@news.sunsite.dk> <56b06eb8$0$301$14726298@news.sunsite.dk> <1454483747.2785.135.camel@obry.net> NNTP-Posting-Host: rrsoftware.com X-Trace: loke.gir.dk 1454972539 11104 24.196.82.226 (8 Feb 2016 23:02:19 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Mon, 8 Feb 2016 23:02:19 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: news.eternal-september.org comp.lang.ada:29447 Date: 2016-02-08T17:02:18-06:00 List-Id: "Dmitry A. Kazakov" wrote in message news:n94cbv$19ed$1@gioia.aioe.org... > On 2016-02-06 01:04, Randy Brukardt wrote: >> "Dmitry A. Kazakov" wrote in message >> news:n91oau$1bk5$1@gioia.aioe.org... >>> On 04/02/2016 22:09, Randy Brukardt wrote: >> .... >>>> (The reason that we adopted the generalized reference feature that we >>>> did >>>> is >>>> because of the ability to use it to manage persistence -- in >>>> particular, >>>> to >>>> be able to figure out when the in-memory copy can be freed and written >>>> to >>>> the backing store.) >>> >>> That is not enough. You need references with a notification upon >>> dereferencing. >> >> That's called "a function call" :-). There's no need for a separate >> feature >> for that (since anonymous access results are essentially uncopyable). >> What >> was missing was a way to know when the access itself goes away. > > That is called a function call too. Well, actually a procedure call (to Finalize). > For persistence layer you need dereference primitive operations. One for > read access in order to cache data and one write access to mark the cache > dirty. The first is the function call (to Reference, if you're looking at the Ada containers), and the second is the Finalize call that happens when the object returned from Reference goes away. That was the whole point of the design. (Of course, you could have written that in Ada 95, but without the syntactic sugar that makes it easier to read and write.) Randy.