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=unavailable 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 00:40:24 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.mathworks.com!arclight.uoregon.edu!hammer.uoregon.edu!logbridge.uoregon.edu!msunews!not-for-mail From: "Chad R. Meiners" Newsgroups: comp.lang.ada Subject: Re: Clause "with and use" Date: Fri, 14 Nov 2003 02:51:01 -0500 Organization: Michigan State University Message-ID: References: <3FB1609E.D56E315C@fakeaddress.nil> NNTP-Posting-Host: arctic.cse.msu.edu X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Xref: archiver1.google.com comp.lang.ada:2480 Date: 2003-11-14T02:51:01-05:00 List-Id: "Russ" <18k11tm001@sneakemail.com> wrote in message news:bebbba07.0311132145.58a4541e@posting.google.com... > Yes, but I don't want to repeat it in every function or procedure that > needs it. And there is no good reason to limit Ada.Text_IO to > individual functions and procedures. Sure there is. In most cases it improves code readability by reminding the reader about which packages are being used. > As far as I'm concerned, that's obsessive/compulsive. It is not obsessive/compulsive; it is putting the information where it should be as opposed to doing what is convenient. I have always found comments about obsessive/compulsiveness interesting as that are almost always use as an insult towards people that display an usual amount of discipline in an activity. My "favorite situation" is when people make obsessive/compulsive comments about safety procedures (He/she is obsessive/compulsive about wearing safety goggles when working with that wood lathe). Strangle enough, your comment sort of falls into that category. Code readability is a safety issue. > > > I think the cleanest approach is to let "use" imply "with". What does > > > that mean? If the compiler sees "use x", but x is not yet "in scope", > > > let the compiler simply pretend that the line "use x" had been > > > preceded by "with x". > > > > So you would you want a use clause that is nested within a function to imply > > a withed package? > > No, absolutely not. The implied "with" would apply only to "use" > clauses in the context section at the top of the file. You need > something at the top of the file to let the reader (and the compiler) > know what external packages will be used. Which would imply that use clauses would have very different semantics based upon the scope in which they are placed. That would really help people misunderstand the language's semantics. > > I wonder how often you call the people you work with idiots and dumbsh*ts to > > their face and then say, "Relax, I'm just kidding". As you might realize, > > No, I don't. But then again, I didn't say *anything* to anyone's > "face" here, did I. Not to mention the fact that nobody here has the > power to terminate my employment. By the way, have you been keeping > track of what *I* have been called here? I get a lot more respect at > work than I get here. I see. Perhaps you get a lot more respect because you are being civil. > > they won't believe the second part; why should we believe you here. You > > have already shown that the only opinion and information that you value are > > those that support your ideas. Statements like the above just reinforce > > everyone's opinion that this is true. > > Lighten up, dude. It was a little joke based on some recent posts on > this thread and others. When you speak in public, you are expected to remain civil. To do otherwise is simply a negative statement about your character, but I will let you worry about your public image. > > But it isn't clutter; with and use serve two different purposes so they > > shouldn't be combined. > > So what that they serve two different purposes? Ever heard of "killing > two birds with one stone"? Yes, I have. I also know that this statement applies to exceptional cases. You are misusing the phrase as a virtue. > Repeating the same package name twice at the top of a file is clutter. This rule is nonsense. I have seen plenty of exceptions to this rule. Do you have enough experience with Ada code to be able to support your rule? > Even if the proposal is adopted, you would still be fully able to use > "use" in the way you consider appropriate and/or correct. Nobody is > trying to take anything away from anyone here. They would be taking away the orthogonality of the two statements.