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!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!io.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: How to get Ada to "cross the chasm"? Date: Fri, 4 May 2018 18:48:19 -0500 Organization: JSA Research & Innovation Message-ID: References: <1c73f159-eae4-4ae7-a348-03964b007197@googlegroups.com> <94bd81e5-2ef5-41a2-973a-72f2ba4cecd1@googlegroups.com> Injection-Date: Fri, 4 May 2018 23:48:20 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="25970"; 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: reader02.eternal-september.org comp.lang.ada:51995 Date: 2018-05-04T18:48:19-05:00 List-Id: "Dan'l Miller" wrote in message news:94bd81e5-2ef5-41a2-973a-72f2ba4cecd1@googlegroups.com... ... >Ultimately it comes down to: Rust's borrow checker in Ada would embrace >accesses as much as references in Rust and smart-pointers in modern C++, >but the trend of modern Ada is to de-emphasize accesses. Yes, that's one approach (see AI12-0240-1 for how that could work in Ada). > Ada-the-language >and Ada-the-de-facto-culture are diverging over time. Doesn't have to. One needs something like the Rust borrow checker to safely implement the containers and other libraries in the "task-safe" world of Ada 2020. But there's no need to expose those access values outside of the container. Indeed, it is much better for everyone if they are not exposed. I'm working on a much simpler version of AI12-0240-1 (an alternative) that would mainly be designed to implement containers and other ADTs. The "borrow checked" access types in such a case are confined to the private part and body of the ADT, and don't cause issues with the rest of the program. My point here is that these are not mutually exclusive positions: a "safe" access type can be very valuable even if its use is not very general. (It's hard in Ada to build a complex data structure without using an access type, and that's especially true if you want to implement the Ada runtime in Ada.) Randy.