From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-65-14.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.6 Path: eternal-september.org!reader02.eternal-september.org!news.uzoreto.com!npeer.as286.net!npeer-ng0.as286.net!proxad.net!feeder1-1.proxad.net!cleanfeed3-a.proxad.net!nnrp4-1.free.fr!not-for-mail From: Thomas Newsgroups: comp.lang.ada Mail-Copies-To: nobody Subject: Re: Unchecked_Deallocation with tagged types References: <607b56f8$0$3721$426a34cc@news.free.fr> <07863309-4541-4497-8cec-d88179e634bdn@googlegroups.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) Date: Sat, 16 Apr 2022 05:44:51 +0200 Message-ID: <625a3bb4$0$22256$426a34cc@news.free.fr> Organization: Guest of ProXad - France NNTP-Posting-Date: 16 Apr 2022 05:44:52 CEST NNTP-Posting-Host: 91.175.52.121 X-Trace: 1650080692 news-4.free.fr 22256 91.175.52.121:2353 X-Complaints-To: abuse@proxad.net Xref: reader02.eternal-september.org comp.lang.ada:63744 List-Id: In article , "Dmitry A. Kazakov" wrote: > On 2021-04-18 11:09, Jeffrey R. Carter wrote: > > On 4/18/21 10:46 AM, Gautier write-only address wrote: > >> Side note: did anyone already suggest a new keyword: unchecked_free > >> and a special statement: > >> > >>    unchecked_free Some_Pointer; > > > > For every access variable P, there could exist the attribute procedure > > > >   P'Free; > > I like the idea of attaching it to a variable rather than to type. why? if it had to be made, i would say it could not be less than sth like: T'Unchecked_Free (P) > > ------------- > I remember the claim that originally making it a generic procedure with > an indigestible name was meant as barrier for lazy programmers. not only that: i agree J-P. Rosen (he didn't said exactly that), it's fine to be able to search for the "Unchecked" keyword, to look at parts of code with some known risk (afaik): Ada.Unchecked_Deallocation, Ada.Unchecked_Conversion, Unchecked_Access. > Plus > some considerations regarding garbage collection lurked in the subconscious. could you explain, please ? :-) -- RAPID maintainer http://savannah.nongnu.org/projects/rapid/