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: Tue, 20 Apr 2021 22:56:58 +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> <86im4hj6eh.fsf@stephe-leake.org> <827fce15-8277-4ec8-a627-01158b42a191n@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 20 Apr 2021 20:56:58 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="547c960cf1afa81c407cf6082b4bd11e"; logging-data="3460"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+6Z8ze1P7/+myaaYlG7ueVlT8pZCG/reo=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 Cancel-Lock: sha1:3ZZqY9qMJExXoR0Grq+79YanCx8= In-Reply-To: <827fce15-8277-4ec8-a627-01158b42a191n@googlegroups.com> Content-Language: en-US Xref: reader02.eternal-september.org comp.lang.ada:61877 List-Id: On 4/20/21 7:34 PM, Vincent Marciante wrote: > > Lists.List My objection is that this says the same thing twice (hence my joke about adding more variants of "List" to it). "This is a list, and by the way, this is a list." To me, Lists.Handle says, "This is something that lets you manipulate a hidden implementation of lists." But the most important thing, I think, is that you've thought about naming and can give meaningful reasoning for your choice. Too often the reason for wanting to use the same name for everything is, "I don't want to think." But thinking of good names is an important part of S/W engineering. > (Wouldn't some "C" people argue for using the same name but > different capitalization to disambiguate ?:-) You can literally use the same name for almost everything in Ada: package List is type List is tagged limited private; procedure Clear (List: in out Standard.List.List); List : Standard.List.List; List.Clear; Even worse, in some cases you can use Latin, Greek, and Cyrillic letters with very similar glyphs to disambiguate. -- Jeff Carter "I'm particularly glad that these lovely children were here today to hear that speech. Not only was it authentic frontier gibberish, it expressed a courage little seen in this day and age." Blazing Saddles 88