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.unit0.net!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 22:41:55 +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 XnS6F1bB/o84D+sOgoqFcgLdMqn0RZJiTr2Ztr1wgf6QKTEP8O Cancel-Lock: sha1:n8TA+wbpU75v73sIArOjbVLTmgQ= 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:52165 Date: 2018-05-09T22:41:55+03:00 List-Id: On 18-05-09 00:46 , Dmitry A. Kazakov wrote: > On 2018-05-08 23:28, Niklas Holsti wrote: >> 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. > > Yes, but that is a bad design anyway. I would say that all such cases > fall into the category when references going in one direction are strong > and the backward ones are weak. That makes it difficult to maintain value semantics for these data structures; how could one have "weak" and "strong" values? -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .