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 X-Received: by 2002:a02:449:: with SMTP id 70mr12914935jab.15.1552988260617; Tue, 19 Mar 2019 02:37:40 -0700 (PDT) X-Received: by 2002:a9d:704c:: with SMTP id x12mr964861otj.28.1552988260359; Tue, 19 Mar 2019 02:37:40 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!i2pn.org!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!78no107672itl.0!news-out.google.com!y88ni122ita.0!nntp.google.com!78no107670itl.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 19 Mar 2019 02:37:40 -0700 (PDT) In-Reply-To: <6f9ea847-2903-48c8-9afc-930201f2765a@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=96.255.209.31; posting-account=zwxLlwoAAAChLBU7oraRzNDnqQYkYbpo NNTP-Posting-Host: 96.255.209.31 References: <6e1977a5-701e-4b4f-a937-a1b89d9127f0@googlegroups.com> <6f9ea847-2903-48c8-9afc-930201f2765a@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Intervention needed? From: Optikos Injection-Date: Tue, 19 Mar 2019 09:37:40 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader01.eternal-september.org comp.lang.ada:55896 Date: 2019-03-19T02:37:40-07:00 List-Id: On Monday, March 18, 2019 at 10:18:54 PM UTC-4, Optikos wrote: > On Monday, March 18, 2019 at 7:36:17 PM UTC-4, Randy Brukardt wrote: > > "Optikos" wrote in message=20 > > news:6e1977a5-701e-4b4f-a937-a1b89d9127f0@googlegroups.com... > > On Tuesday, March 12, 2019 at 5:53:04 PM UTC-4, Randy Brukardt wrote: > > >ARG, please leave an immense paper trail of what-conflicts-with-what i= n > > >Ada as defined to achieve a Rust-esque borrow checker in its full=20 > > >perfect-pointer form. > >=20 > > Read the proposals for AI12-0240-1 through AI12-0240-5. The main proble= m is=20 > > massive amounts of complexity. > >=20 > > >Randy, would Tucker's new ownership proposal come close to 100%=20 > > >feature-parity > > >with Rust's borrow checker? > > ... > > since the containers are designed with possibly dangling cursors, a tot= ally=20 > > safe system would not be usable with them. The containers do include ch= ecks=20 > > that would detect many ownership problems, however, so any lack of=20 > > compile-time safety is definitely mitigated. (It's not 100% safe becaus= e of=20 > > the possiblity that a cursor outlive the owner object; in that case, th= e=20 > > checks are unreliable.) >=20 > A container could have (as a required fundamental axiom) a singly-linked = list of spirits of all cursors ever created that reference it. As each cur= sor's life ends, that dying cursor directly knows O(1) where its spirit is = within that linked list, and then removes its dying spirit too. Then as th= e lifetime of the container ends, the finalization of that linked list is t= o walk that link-list of spirits to abruptly undermine each spirit's corres= ponding still-living cursor so that that longer-lived-than-its-container cu= rsor abruptly has the usual customary representation of cursor-exhausted-it= s-walk-of-the-container (i.e., the end-of-loop criterion during normal-oper= ations' not-end-of-lifed cursor walks of not-end-of-lifed container), so th= at cursors are all instantly loop-terminating gracefully whenever their con= tainer ceases to exist. >=20 > Hence, no cursor ever contains a pointer/access/address value that out li= ves its container, because that pointer was overwritten (at container final= ization) with the cursor-exhausted-its-walk-of-the-container reserved value= that all loops & conditional branches interrogate as a matter of their nor= mal-operations behavior. Q.E.D. >=20 > Randy, are there any other examples of feared-to-be-dangling pointers out= living what they point to in Tucker's latest proposal? I was combining memories of 2 prior designs as I wrote this. That =E2=80= =9Csingly-linked list=E2=80=9D should have been: doubly linked list.