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!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Implementing Rust's borrow checked pointers Date: Tue, 24 Sep 2019 18:24:21 +0200 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 24 Sep 2019 16:24:23 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="e7a09e6f2a08daa9efb124d09b9635c9"; logging-data="24918"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19s0JtfyQ8fBPv6qFp6yFCfGi6Tx+kxadI=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 Cancel-Lock: sha1:MZh/hov/Nn1OH+chw6ZYUoMRFe4= In-Reply-To: Content-Language: en-US Xref: reader01.eternal-september.org comp.lang.ada:57183 Date: 2019-09-24T18:24:21+02:00 List-Id: On 9/24/19 11:05 AM, Lucretia wrote: > > type P is restricted access X; > > Restricted in this case would mean that once assigned it cannot be re-assigned into or out of with out some sort of move operation, which could be implemented as an attribute on the access type. What's wrong with "limited"? There's already work on including something like Rust's borrow checking into Ada, but given how rarely access types are needed, and how easy it usually is to confine them to a restricted scope when they are, I don't see that it's worth the effort. -- Jeff Carter "Drown in a vat of whiskey. Death, where is thy sting?" Never Give a Sucker an Even Break 106