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=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Path: eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Unchecked_Deallocation with tagged types Date: Sun, 18 Apr 2021 18:48:40 +0200 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <607b56f8$0$3721$426a34cc@news.free.fr> <607bf826$0$3733$426a74cc@news.free.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sun, 18 Apr 2021 16:48:42 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="78be621f004a3a0063646341c0d3f12d"; logging-data="2911"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19RTc8GGHhJLyxweXy0bmPWadI0ZB0st+4=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 Cancel-Lock: sha1:3xLhQ/MKgIv5BW1Ka7Oij70xyrs= In-Reply-To: <607bf826$0$3733$426a74cc@news.free.fr> Content-Language: en-US Xref: reader02.eternal-september.org comp.lang.ada:61828 List-Id: On 4/18/21 11:13 AM, DrPi wrote: >> > I know Ada convention is to use Camel_Case_Syntax. Maybe there's also a > convention for naming ? There are many conventions for naming, most of them poor (defined as any I don't like). You know the rule that comments should not repeat what's clear from the code? A similar rule should apply to identifiers. So if you have type is record ... it's clear that is a type name for a record type, so it should not repeat any of that. Many types are declared in package specs, along with operations on the type. There, the objective should be to have parameter names for the operations that read well with named notation. The type name must then be something different. I like to use package Lists is type Handle is tagged limited private; procedure Clear (List : in out Handle); and then use List : Lists.Handle; List.Clear; -- Jeff Carter "Run away! Run away!" Monty Python and the Holy Grail 58