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!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: How to get Ada to ?cross the chasm?? Date: Wed, 9 May 2018 00:28:53 +0300 Organization: Tidorum Ltd Message-ID: References: <1c73f159-eae4-4ae7-a348-03964b007197@googlegroups.com> <87in8buttb.fsf@jacob-sparre.dk> <87wowqpowu.fsf@nightsong.com> <16406268-83df-4564-8855-9bd0fe9caac0@googlegroups.com> <87o9i2pkcr.fsf@nightsong.com> <87in88m43h.fsf@nightsong.com> <87efiuope8.fsf@nightsong.com> <87lgd1heva.fsf@nightsong.com> <87zi1gz3kl.fsf@nightsong.com> <878t8x7k1j.fsf@nightsong.com> <87k1sg2qux.fsf@nightsong.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net GlIwWtSBmeDlMC/ogJ1oUQ0Lo0JTF14zkvoL1FaN1nS21dI0kK Cancel-Lock: sha1:fktNBYN9cHmybpL2onkuDHDLpUU= 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: reader02.eternal-september.org comp.lang.ada:52132 Date: 2018-05-09T00:28:53+03:00 List-Id: On 18-05-07 10:25 , Dmitry A. Kazakov wrote: > On 07/05/2018 03:31, Paul Rubin wrote: >> "Dmitry A. Kazakov" writes: >>> This is easily done in present Ada using handles to a >>> reference-counted objects. >> >> That's not much different from gc from the user's perspective, other >> than problems handling cycles. > > Cycles are easily avoidable too by separating target objects and > handles. All target objects types go into the private part of the > package. When only handles are visible there is no way the end user > could construct a cycle. True for a single such data structure; much harder if the client combines different, independently implemented data structures and stores, in one structure, handles that point at the other structure, and perhaps in the other direction too. Since the implementations of the two data structures are ignorant of each other's existence, neither can detect such cross-structure cycles, I believe. GC-based languages handle such cross-structure cycles in the same way as within-structure cycles. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .