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,FREEMAIL_FROM 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-15 07:19:50 PST Path: archiver1.google.com!news2.google.com!fu-berlin.de!peer01.cox.net!cox.net!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!intern1.nntp.aus1.giganews.com!nntp.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Sat, 15 Nov 2003 09:19:48 -0600 Date: Sat, 15 Nov 2003 10:19:47 -0500 From: "Robert I. Eachus" 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: for reply from news@kiuk0156.chembio.ntnu.no> <3FB1609E.D56E315C@fakeaddress.nil> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 24.34.214.193 X-Trace: sv3-MiUrBLw3sENr9ACOk1PMdlhZS0LQV1uJ36wp4eltsHLnvEtx8gefGIIV4YLtC+Z9ou9jMSXOcQu1bWi!BH4vFiy/K9AfdfYd805uOURXBkcAVN1hO5u1+eMVVsFb9nXcIffUMAPU91gGgA== X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.1 Xref: archiver1.google.com comp.lang.ada:2515 Date: 2003-11-15T10:19:47-05:00 List-Id: Russ wrote: > This whole line about "with" and "use" having different meanings is > completely irrelevant. I don't care if "with" sends a mouse to the > moon and "use" massages my feet. The simple fact is that "use" implies > "with," whether you like it or not. Just try to use "use" without > "with", and the compiler will tell you so. If I say, "use a hammer," > do I need to precede it with, "obtain a hammer"? Of course not. You > cannot possibly "use" a hammer if one is not available. Bzzzt! Wrong Answer, try again. A use clasue in Ada does NOT imply that there is a with around somewhere. Try compiling: procedure Junk is use Ascii; begin null; end Junk; If you have any doubts about that. Ascii is somewhat special, but fairly common is: package Outer is... package Inner is... end Outer; package body Outer is use Inner; ... end Outer; Again a use clause without a with clause in sight. Another common case is a generic package instance. The use clause refers to the local instance rather than to any external unit. You really do need to study the language and start using (ouch!) it correctly before you make ex cathedra statements like that. > You are confusing two different issues here. One issue is what *you* > consider good programming practice, and the other issue is what the > language allows or should allow. *You* don't think that "use" should > ever be used in the context section at the top of a file. Sorry, Ada > allows it, and many excellent programmers consider it perfectly > acceptable in many cases. Fine, it is perfectly acceptable in many cases, but it still says two separate and separable things. If you want to argue for a language change to add "with and use" as a context clause feel free. I tend to think of that as a text editor issue, but different opinions are possible. However drop the shrill tone when people are patiently trying to explain something to you. With and use currently have two very different meanings in Ada. Confusing the meaning of use by having it sometimes mean with and use would be a possible language change. Such a change is highly unlikely since it violates the "-ilities" that Ada is designed to promote. -- Robert I. Eachus 100% Ada, no bugs--the only way to create software.