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!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: Your wish list for Ada 202X Date: Thu, 24 Apr 2014 00:00:49 +0200 Organization: A noiseless patient Spider Message-ID: References: <7f1c01c5-3563-4b94-9831-152dbbf2ecdc@googlegroups.com> <9f156351-e3d0-4d86-b816-1d5e09ee69da@googlegroups.com> <4e3a0e68-1514-4255-9c76-ef8758991ded@googlegroups.com> <1398288591.4400.104.camel@pascal.home.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Wed, 23 Apr 2014 22:00:47 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="2b3884a634d8f846e0712b4e3a92507a"; logging-data="25734"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19RuxbUYymmeErHrp+IR3nc" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 In-Reply-To: <1398288591.4400.104.camel@pascal.home.net> Cancel-Lock: sha1:QF3MMk35rASYVR4JPCkhSBVmpBU= X-Enigmail-Version: 1.6 Xref: news.eternal-september.org comp.lang.ada:19552 Date: 2014-04-24T00:00:49+02:00 List-Id: Le 23/04/2014 23:29, Pascal Obry a écrit : > I fully agree. I'm also in the "no use" clan. I am not, but see below > Far better to declare the constant NO_ERROR and the packages SIEMENS_S5 > and CRANE. Then CRANE_NO_ERROR or CRANE.NO_ERROR does not have more > characters and avoid to have a extended visibility. Having a "use" clause does not prevent to use a full name when one thinks it is more readable. I do that all the time. > I've never understood why people just put use everywhere and most often > at the top of the unit. This gives visibility to the whole unit plus all > the children. It is then harder to refactor the code as it is quite > difficult to see what is actually used and where. Sure. Actually, the carefull separation between "with" and "use" has been designed to allow opening visibility just when and where you need access to the content. Putting "use" on top of the unit defeats the very purpose of the "use" clause. "use" clauses are very helpful and make code a lot more readable, provided they are restricted to the innermost context where they are useful (and of course, you have an AdaControl rule to enforce that ;-) ). -- 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