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-12 23:26:22 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: 18k11tm001@sneakemail.com (Russ) Newsgroups: comp.lang.ada Subject: Re: Clause "with and use" Date: 12 Nov 2003 23:26:21 -0800 Organization: http://groups.google.com Message-ID: References: for reply from news@kiuk0156.chembio.ntnu.no> <3FAF8C99.5040201@noplace.com> <3FB1609E.D56E315C@fakeaddress.nil> NNTP-Posting-Host: 63.194.87.148 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1068708382 12381 127.0.0.1 (13 Nov 2003 07:26:22 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 13 Nov 2003 07:26:22 +0000 (UTC) Xref: archiver1.google.com comp.lang.ada:2438 Date: 2003-11-12T23:26:21-08:00 List-Id: Vinzent 'Gadget' Hoefler wrote in message news:... > Gautier Write-only wrote: > > >Vinzent 'Gadget' Hoefler: > > > >> For *sale*. Exactly. BTW, I still don't understand what is redundant > >> on with and use. I don't use "use" (well, at least not globally). > >In this case, effectively, you are not likely to see a redundance. > > Hmm. True. Good point. :-) I say it's redundant because it doesn't make sense to have "use" without a corresponding "with". Let's say "with" is level 1, and "use" is level 2. If you're at level 2, that implies you're already past level 1, so specifying both level 1 and level 2 is redundant. It's like saying that the Florida Marlins won the World Series, then also saying that they won the NL Championship. The former implies the latter and is therefore redundant. It belongs in the Department of Redundancy Department. I appreciate your discipline in shunning "use," but I assume the language provides it for a good reason. For basic I/O and math, for example, I think "use" is perfectly appropriate. I'm sorry, but "sin" and "cos" will always be just "sin" and "cos" to me, and I prefer to see them that way. (I gave an example on this forum a few months ago of great-circle equations involving no less than 10 math function calls in a single expression.) > >In your place I wouldn't worry at all about this proposal. > > Hey, it's still *my* language! Or so. ;) > > Ok, seriously, being able to use "use" without its corresponding with > in one case and differently in another looks inconsistent for me. 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". Now, admittedly, that involves some semantic subtleties because the "withed" package spec need be identical to the "used" spec (due to the conventions for child packages). I suspect that any potential ambiguity is easily resolvable with simple conventions, but I could be wrong. OK, suppose I am wrong. Then the fallback position is to allow "with and use x" or "with/use x", as previously suggested. That removes all semantic ambiguity, and is logically equivalent to separate "with" and "use" clauses, but without the repetitious clutter. > To bring it to the point and the way I see it: "with" is for > thecompiler/linker to state dependencies, use is for the programmer. > For me that's two different things and I wouldn't like them to get > mixed up. Well yes, but ... "with" tells the compiler which packages will be used (ironically), and "use" tells the compiler how the elements of a package will be referred to, so it's for the compiler too. For those who insist that this whole issue is "minor" or even "trivial", here's what I have to say to you. You're all idiots and dumbsh*ts. Relax, I'm just kidding. You are completely right. It *is* trivial. But as I said before, it's like the clutter in the front yard of a house for sale: it can do harm to the market value of Ada, and it's trivial to clean up too. For crying out loud, just do it and be done with it.