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!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: article on acces types and dynamic serialization in Ada (2003) Date: Fri, 23 Feb 2018 14:13:42 +0100 Organization: Aioe.org NNTP Server Message-ID: References: <503e3322-ee8e-4d6f-9aa5-e7b98f87e8f8@googlegroups.com> NNTP-Posting-Host: MyFhHs417jM9AgzRpXn7yg.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 X-Notice: Filtered by postfilter v. 0.8.3 Content-Language: en-US Xref: reader02.eternal-september.org comp.lang.ada:50599 Date: 2018-02-23T14:13:42+01:00 List-Id: On 23/02/2018 11:30, Mehdi Saada wrote: > It could be I'm just too ignorant of data-structures, but besides (different types of) nodes and (different types of) pointers to represent arrows/links, I don't see why a reference counting strategy wouldn't work for all. Why it works, but requires a massive infrastructure. In general, you need external and internal reference counting. You will have external objects and memory-mapped proxies of. You will have to synchronize, commit, when proxy's internal reference count = 0, but the external reference count > 0. All this is beyond mere serialization and about object persistence. Note that persistent linked structures are not stored as blobs but as individual nodes, individually accessible with individual reference counts etc. It is complicated and not language business to meddle with. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de