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!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: Type naming conventions: Any_Foo Date: Fri, 6 Dec 2019 10:55:28 +0100 Organization: Adalog Message-ID: References: <3f12f2df-cd5d-4862-9ca0-9a16d4d7cff3@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Fri, 6 Dec 2019 09:55:27 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="32b939cf2199a598c0fcc0ae7a3058d8"; logging-data="9513"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX184nG2iCN0mkaNVct3+wbhP" User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 Cancel-Lock: sha1:+mlF6KTFTaGMmKJesWRNwk6wSiA= In-Reply-To: <3f12f2df-cd5d-4862-9ca0-9a16d4d7cff3@googlegroups.com> Content-Language: fr Openpgp: preference=signencrypt Xref: reader01.eternal-september.org comp.lang.ada:57666 Date: 2019-12-06T10:55:28+01:00 List-Id: Le 06/12/2019 à 09:57, AdaMagica a écrit : > Also a declaration like > > My_Weapon: Weapons.Weapon; > > is akward when use-clause is banned. So a further point to consider > is whether you want your package to be used with use-clause or > without: > > My_Weapon: Weapons.Object; > > I'm not sure I like this. Small remark: do not confuse using the use clause, and not using selected names. You are perfectly allowed to use slected names within the scope of a use clause if you feel it is more readable! I am a known supporter of the use clause, however for classes, I use the package for the object name, and "object" for the record that's the data part of it. Of course, I always use selected names in that case. [small plug] There is an AdaControl rule to check that some names always use selected notation. Whether or not you are hostile to the use clause, the best advice is to choose a name which is nice for your favorite notation, and acceptable for the other one. -- J-P. Rosen Adalog 2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00 http://www.adalog.fr