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-17 08:49:23 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!cyclone.bc.net!news-in.mts.net!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: Mon, 17 Nov 2003 11:42:45 -0500 NNTP-Posting-Host: 198.96.223.163 X-Complaints-To: abuse@sympatico.ca X-Trace: news20.bellglobal.com 1069087329 198.96.223.163 (Mon, 17 Nov 2003 11:42:09 EST) NNTP-Posting-Date: Mon, 17 Nov 2003 11:42:09 EST Organization: Bell Sympatico Xref: archiver1.google.com comp.lang.ada:2573 Date: 2003-11-17T11:42:45-05:00 List-Id: Dmitry A. Kazakov wrote: > On Fri, 14 Nov 2003 09:51:33 -0500, "Warren W. Gay VE3WWG" > wrote: >>Dmitry A. Kazakov wrote: >>>On Thu, 13 Nov 2003 12:51:51 -0500, "Warren W. Gay VE3WWG" >>> wrote: ... >>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. > > After all Ada itself is just for convenience. We can still use > hexadecimal machine codes! (:-)) That's silly, but I see the smiley. > Let me propose a design principle for all standard and semi-standard > Ada libraries: > > "Any program should remain compilable if all of them are "use"-d." > > Scared? (:-)) > >>Misuse that convenience, and you'll experience problems. >>Conclusion: there is nothing wrong with the language >>feature, but only the application thereof. ;-) > > There should be something wrong with the language, if the following is > illegal: > > with Ada.Io_Exceptions; > package A is > End_Error : exception renames Ada.Io_Exceptions.End_Error; > end A; > > with Ada.Io_Exceptions; > package B is > End_Error : exception renames Ada.Io_Exceptions.End_Error; > end B; This is more sillyness. When you USE both packages, you take a hierarchical name space and flatten it. So what else would you expect if there were clashes? -- Warren W. Gay VE3WWG http://home.cogeco.ca/~ve3wwg