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!gandalf.srv.welterde.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: How to get Ada to ?cross the chasm?? Date: Fri, 11 May 2018 15:46:58 -0500 Organization: JSA Research & Innovation Message-ID: References: <1c73f159-eae4-4ae7-a348-03964b007197@googlegroups.com> <87zi1gz3kl.fsf@nightsong.com> <878t8x7k1j.fsf@nightsong.com> <87k1sg2qux.fsf@nightsong.com> <87h8njmk4r.fsf@nightsong.com> <87po27fbv9.fsf@nightsong.com> <87h8nhwhef.fsf@nightsong.com> <87d0y4zf7d.fsf@nightsong.com> <87tvrfyvha.fsf@nightsong.com> Injection-Date: Fri, 11 May 2018 20:46:59 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="27393"; mail-complaints-to="news@jacob-sparre.dk" 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.7246 Xref: reader02.eternal-september.org comp.lang.ada:52291 Date: 2018-05-11T15:46:58-05:00 List-Id: "Niklas Holsti" wrote in message news:flkuk5F1ft1U1@mid.individual.net... ... > However, I don't think this method will free you from worrying about > dangling references -- I believe a cursor can be left dangling, just as an > access value can be. (I haven't yet had occasion to do such > container-centric Ada programming, although I have used the Ada containers > in less central roles.) Correct. However, an implementation can detect dangling cursors if it wants to, so (depending on implementation), you could get an exception raised when using one (unlike a dangling pointer which does whatever [formally, "erroneous execution"]). The main reason that we didn't require dangling pointer detection is that a perfect scheme is quite expensive -- but a 99.99...% detection scheme is reasonably efficient and IMHO should be part of every implementation (possibly with some way to turn it off if maximum performance is needed). Randy.