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!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.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: Intervention needed? Date: Mon, 18 Mar 2019 18:36:15 -0500 Organization: JSA Research & Innovation Message-ID: References: <6e1977a5-701e-4b4f-a937-a1b89d9127f0@googlegroups.com> Injection-Date: Mon, 18 Mar 2019 23:36:16 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="3687"; 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; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader01.eternal-september.org comp.lang.ada:55893 Date: 2019-03-18T18:36:15-05:00 List-Id: "Optikos" wrote in message 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 in >Ada as defined to achieve a Rust-esque borrow checker in its full >perfect-pointer form. Read the proposals for AI12-0240-1 through AI12-0240-5. The main problem is massive amounts of complexity. >Randy, would Tucker's new ownership proposal come close to 100% >feature-parity >with Rust's borrow checker? Surely not the latest one, since lots of stuff was dropped from it. But a better question is whether the Rust borrow checker allows building proper ADTs for most data structures. Most of Tucker's proposals didn't have a safe way to build typical data structures like a doubly-linked list or the parent pointer of a tree structure. Leaving out these backward pointers means adding a substantial performance degradation for (possibly) common operations like node deletion. Depending on what you're doing, that could be a non-starter. I haven't had a chance to actually look at Rust's actual rules; Ada is hard enough and as we're in the home stretch for Ada 2020, I literally don't have time for much else. (Probably shouldn't be answering this message...) Tucker's latest proposal does address the back pointer problem. So at least that can be done with checks. In any case, an Ada proposal has to be able to build the containers, and since the containers are designed with possibly dangling cursors, a totally safe system would not be usable with them. The containers do include checks that would detect many ownership problems, however, so any lack of compile-time safety is definitely mitigated. (It's not 100% safe because of the possiblity that a cursor outlive the owner object; in that case, the checks are unreliable.) Randy.