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-17 11:40:26 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: 17 Nov 2003 11:40:25 -0800 Organization: http://groups.google.com Message-ID: References: <3FB6513B.DA6E53CA@fakeaddress.nil> NNTP-Posting-Host: 128.102.146.44 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1069098026 18925 127.0.0.1 (17 Nov 2003 19:40:26 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 17 Nov 2003 19:40:26 +0000 (UTC) Xref: archiver1.google.com comp.lang.ada:2585 Date: 2003-11-17T11:40:25-08:00 List-Id: "Robert I. Eachus" wrote in message news:... > Dmitry A. Kazakov wrote: > > > Exactly the same Ada would do. The effect should be defined to be > > literally same as for: > > > > with Foo; use Foo; with Bar; use Bar; > > > > So Foo.Bar cannot play any role here. Note that the proposal says > > *implies* "with Bar;". After all Foo.Bar cannot be "with"-ed and thus > > cannot be implied. > > And that is exactly the problem. I am sorry you don't see it. The with > clause has an effect on visibility that includes the use clause. > Current use clauses have a different scope. So if I see: > > with Foo; use Foo.Bar; > > which is currently legal and meaningful, what does your proposal do? Not being an Ada programmer, I did not even know off the top of my head that "with Foo.Bar" is illegal. I'm at work, and my Ada books are at home, so let me ask a "newbie" question. Am I correct in assuming that "use Foo.Bar" *must* be preceded by "with Foo"? More specifically, am I correct in assuming that "use Foo." *must* be preceded by "with Foo"? If so, then the solution seems trivial to me. Let any occurence of "use Foo." in the context section imply "with Foo". That is, for any "use" in the context section, simply take its argument and strip off the first "." and anything that follows it, then use that as the argument to the implied "with". If not, I guess I just made a fool of myself. Oh well.