From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=0.8 required=3.0 tests=BAYES_50 autolearn=ham autolearn_force=no version=3.4.5-pre1 X-Received: by 2002:ad4:5361:: with SMTP id e1mr14063184qvv.110.1595836050552; Mon, 27 Jul 2020 00:47:30 -0700 (PDT) X-Received: by 2002:aed:3081:: with SMTP id 1mr21094970qtf.118.1595836050298; Mon, 27 Jul 2020 00:47:30 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 27 Jul 2020 00:47:30 -0700 (PDT) In-Reply-To: <94a54092-a56f-4a99-aaec-08dd611c8fd8@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=2a01:cb14:7c8:5800:e8fc:2cb6:70cb:929; posting-account=T8VIJwoAAAA-IUorDdqOSpjmb16opbau NNTP-Posting-Host: 2a01:cb14:7c8:5800:e8fc:2cb6:70cb:929 References: <94a54092-a56f-4a99-aaec-08dd611c8fd8@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <8a502b6c-4609-4cd8-b292-5797fe6421e1n@googlegroups.com> Subject: Re: Proposal: Auto-allocation of Indefinite Objects From: Yannick Moy Injection-Date: Mon, 27 Jul 2020 07:47:30 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader01.eternal-september.org comp.lang.ada:59538 List-Id: Hi Stephen, On Saturday, April 4, 2020 at 12:48:43 AM UTC+2, Stephen Davies wrote: > Firstly, apologies if this has already been discussed or,=20 > more likely, if it's a really stupid idea for some reason=20 > that I haven't thought of.=20 Actually, that's something more and more of us would like to see. > My proposal is that it should (sometimes?) be possible to declare=20 > objects of indefinite types such as String and have the compiler=20 > automatically declare the space for them without the programmer=20 > having to resort to access types.=20 I agree with the goal. > Benefits:=20 >=20 > 1. Easier, especially for newbies/students.=20 > 2. Safer due to reduced use of access types.=20 > 3. Remove the need to have definite and indefinite versions of generic un= its.=20 I agree with 2 only if we can combine this with safe handling of aliasing. = It would be terrible to have such a feature lead to unsafe code if you some= how copy the pointer. Also, for strings that's possibly not the only change= needed. What you'd like really is to be able to reassign the string to som= e larger/smaller string, like you do when using Unbounded_String. On 2020-04-04, Jeffrey R. Carter wrote: > > the ARG is aware of them and has chosen to take no action. > That seems unlikely to change. On the other hand, AdaCore has launched a project to collect/discuss ideas/= suggestions/problems regarding the evolution of Ada and SPARK: https://gith= ub.com/AdaCore/ada-spark-rfcs Feel free to open an Issue there on that topic.