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,1e3f2eac5c026e3 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-12-19 00:51:44 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: 18k11tm001@sneakemail.com (Russ) Newsgroups: comp.lang.ada Subject: Re: Other Ada Standards (was Re: SIGada Conference) Date: 19 Dec 2003 00:51:43 -0800 Organization: http://groups.google.com Message-ID: References: <468D78E4EE5C6A4093A4C00F29DF513D04B82B08@VS2.hdi.tvcabo> <657ea3e3.0312172255.4869eae5@posting.google.com> <0cOdndZsZbH6W3yiRVn-gg@comcast.com> NNTP-Posting-Host: 63.194.87.148 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1071823904 3490 127.0.0.1 (19 Dec 2003 08:51:44 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 19 Dec 2003 08:51:44 +0000 (UTC) Xref: archiver1.google.com comp.lang.ada:3548 Date: 2003-12-19T00:51:43-08:00 List-Id: Robert A Duff wrote in message news:... > "Robert I. Eachus" writes: > > > As for "with and use" I did comment on that proposal here. Unfortunately > > I probably spent more time explaining why "use implies with" can't work, > > than discussing how to allow a "with and use" context clause. The > > problem with "with implies use" has nothing to do with most cases where > > users would want to use "with and use". The problem is that some use > > clauses, even in context clauses, name units that cannot be withed. > > Adding "with and use" to the language would not be a problem, changing > > "use" to mean "with and use" is a non-starter. > > I don't agree. You could say that "use A.B.C;" in a context clause > implies a subset of "with A;", "with A.B;", and "with A.B.C;" -- just > the ones that happen to be library units. Or, you could *require* that > they be library units, or be nested within already-mentioned library > units, if you think that makes the code more readable. Either rule > would work, and be easily implementable. And either rule would be preferable to requiring double naming of the library units. > Unfortunately, you can't just say that "use A.B.C;" is equivalent to > "with A.B.C; use A.B.C;", because A.B.C might not be a library unit. > Suppose A.B is a library package containing a nested package C. > Then "with A.B; use A.B.C;" is currently legal. We can't say it's > equivalent to "with A.B; with A.B.C; use A.B.C;", because that would > be illegal, so the rule would be incompatible. And here's yet a third alternative that would be preferable to the double naming clutter at the top of so many source files. Simple let "use" imply "with", and if it doesn't compile, so what? The programmer simply goes back and put in an explicit "with" that makes it work. No big deal -- and no worse than the current situation. So there are at least three alternatives that are preferable to the status quo. If all three of them are rejected, then I think the Ada community is shooting itself in the foot -- or somewhere else.