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,WEIRD_PORT 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-06 02:55:21 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news.tele.dk!news.tele.dk!small.news.tele.dk!uninett.no!ntnu.no!not-for-mail From: Preben Randhol Newsgroups: comp.lang.ada Subject: Re: Clause "with and use" Date: Thu, 6 Nov 2003 10:55:21 +0000 (UTC) Organization: PVV Message-ID: References: <3FA2CDCB.500F4AF0@fakeaddress.nil> <3FA3B412.AF3BEB96@fakeaddress.nil> <3FA6D275.924D5750@fakeaddress.nil> <1067951806.729117@master.nyc.kbcfp.com> NNTP-Posting-Host: kiuk0156.chembio.ntnu.no X-Trace: tyfon.itea.ntnu.no 1068116121 19128 129.241.83.82 (6 Nov 2003 10:55:21 GMT) X-Complaints-To: usenet@itea.ntnu.no NNTP-Posting-Date: Thu, 6 Nov 2003 10:55:21 +0000 (UTC) User-Agent: slrn/0.9.8.0 (Linux) Xref: archiver1.google.com comp.lang.ada:2134 Date: 2003-11-06T10:55:21+00:00 List-Id: On 2003-11-04, Hyman Rosen wrote: > Preben Randhol wrote: >> with Ada.Text_IO; use Ada.Text_IO; > > The usual arguments of extra verbosity leading to clarity > don't apply to with/use. The problem is that the things in > the use clause don't necessarily have to be identical to > the things in the with clause. That means every time you > see a with/use set, you must verify that the packages in > both are in fact identical, and if they are not, figure > out why that is so. I don't understand what you mean. Could you clarify this? Do you mean that if you do: with packA; use packA; with packB; use packB; and both packages has a procedure P you won't see in the code from which package you called it? In that case you get: ambiguous expression (cannot resolve "p") possible interpretation at packb.ads:2 possible interpretation at packa.ads:2 compilation error or do you mean that if packA had a child package B and you wrote : with packA; use packA use B; then you get: "b" is undefined compilation error So what do you relaly mean? Preben -- "Saving keystrokes is the job of the text editor, not the programming language."