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!aioe.org!.POSTED.fn3LatRFkm9/xzEj7F2/NQ.user.gioia.aioe.org!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Intervention needed? Date: Wed, 20 Mar 2019 09:42:27 +0100 Organization: Aioe.org NNTP Server Message-ID: References: <6e1977a5-701e-4b4f-a937-a1b89d9127f0@googlegroups.com> <6f9ea847-2903-48c8-9afc-930201f2765a@googlegroups.com> <94a74b21-9c35-4f90-90f8-6262cde49e20@googlegroups.com> NNTP-Posting-Host: fn3LatRFkm9/xzEj7F2/NQ.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.3 X-Notice: Filtered by postfilter v. 0.9.2 Content-Language: en-US Xref: reader01.eternal-september.org comp.lang.ada:55913 Date: 2019-03-20T09:42:27+01:00 List-Id: On 2019-03-20 02:28, Jere wrote: > On Tuesday, March 19, 2019 at 7:13:47 PM UTC-4, Randy Brukardt wrote: >> >> Sadly, what I see here is someone who's so bought into Rust hype that they >> fail to consider the real trade-offs implicit in such a technology. There's >> no reason to bring the basic Rust scheme into Ada, since there is almost no >> reason in Ada to create such pointers in the first place (see my reply to >> Paul). > > I'd say the biggest area that forces me to use access types is when > dealing with complex limited types. True. All boils down old issues: 1. Language-controlled references to access insides of containers. 2. Array abstraction to iterate using loops and #1 instead of pointer/handle/iterator. 3. Proper construction, especially for limited types, in order to initialize in-place using parameters. Limited return will never fly. > If I want to use any kind of container > implementation for a collection of limited types, I am forced to roll > my own and generally have to use access types somewhere. Same if I need > to use a limited type in non limited context. There is a difference between using pointers in order to implement something you could not do without them and reference semantics. Aliasing is an undesired effect in the former case and a requirement in the latter. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de