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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,60e2922351e0e780 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-11-01 05:24:37 PST Message-ID: <3FA3B412.AF3BEB96@fakeaddress.nil> Date: Sat, 01 Nov 2003 14:24:34 +0100 From: Gautier Write-only X-Mailer: Mozilla 4.8 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Clause "with and use" References: <3FA2CDCB.500F4AF0@fakeaddress.nil> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 80.218.90.97 X-Trace: news.swissonline.ch 1067693076 80.218.90.97 (1 Nov 2003 14:24:36 +0200) X-Complaints-To: abuse@swissonline.ch Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!irazu.switch.ch!news-zh.switch.ch!switch.ch!news.swissonline.ch!not-for-mail Xref: archiver1.google.com comp.lang.ada:1898 Date: 2003-11-01T14:24:34+01:00 List-Id: Pascal Obry: > I really don't like this idea. This will just help writing bad Ada programs. I > think that a use clause must be avoided if possible and if not the use > clause should be put the more local possible (inside the routines that really > use feature from the package). If you wanted to discourage writing bad programs in that optic, you should suppress the use_clause as a context_clause (for the non-Manual maniaks, these are clauses before "procedure" or "package"). The with_and_use_clause won't add any facility, but will reduce typing. As you say, the usage of "use" must be as local as possible, if even needed. Sometimes (and it may concern lots of packages in some situations) the most reasonabily local place for "use" is in a context clause... > This helps understanding the program > better. Having hundreds of with/use at the start of a program is the better > way to get lost ! This is exactly that problem "with and use" will help solving. If you move one context "use" to ten local places just to lighten the start of your program, you won't necessarily improve the the overall readability, but add noise a bit further in the program... ________________________________________________________ Gautier -- http://www.mysunrise.ch/users/gdm/gsoft.htm NB: For a direct answer, e-mail address on the Web site!