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-14 07:06:03 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!c03.atl99!chi1.webusenet.com!news.webusenet.com!snoopy.risq.qc.ca!news.uunet.ca!nf3.bellglobal.com!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail From: "Warren W. Gay VE3WWG" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Clause "with and use" References: <1068561335.260886@master.nyc.kbcfp.com> <_rGsb.39$pv1.0@read3.inet.fi> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Fri, 14 Nov 2003 09:51:33 -0500 NNTP-Posting-Host: 198.96.223.163 X-Complaints-To: abuse@sympatico.ca X-Trace: news20.bellglobal.com 1068821457 198.96.223.163 (Fri, 14 Nov 2003 09:50:57 EST) NNTP-Posting-Date: Fri, 14 Nov 2003 09:50:57 EST Organization: Bell Sympatico Xref: archiver1.google.com comp.lang.ada:2492 Date: 2003-11-14T09:51:33-05:00 List-Id: Dmitry A. Kazakov wrote: > On Thu, 13 Nov 2003 12:51:51 -0500, "Warren W. Gay VE3WWG" > wrote: > >>I agree with this whole-heartedly for anything more than >>a simple "hello world" program. This keeps the name >>clashes to a minimum, and it prevents unintended >>references to functions/procedures in the wrong package. >>There may be some exceptions to this, but these should be >>kept to a bare minimum, IMHO. > > Does anybody a statistics of name clashes in Ada? I don't have statistics to offer, but here is one that I regularly run into (and there are others like this one): USE ADA.STRINGS; If this is done in the wrong place (like at the top), then then the names Left and Right come into conflict (ie. Ada.Strings.Left). Left and Right are perfectly acceptable names to use in programming. >What percent is caused by the language design problems: ... >I have a feeling that hatred towards "use" is largely caused by >outside reasons like A. and B. I think we have to remember that USE is primarily a language construct for convenience. It is strictly unnecessary for writing a program successfully. It only saves the program writer (and reader) from having to specify (or read) the entire hierarchical name. Misuse that convenience, and you'll experience problems. Conclusion: there is nothing wrong with the language feature, but only the application thereof. ;-) -- Warren W. Gay VE3WWG http://home.cogeco.ca/~ve3wwg