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 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-27 10:43:50 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Other Ada Standards (was Re: SIGada Conference) Date: 27 Dec 2003 13:43:50 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <468D78E4EE5C6A4093A4C00F29DF513D04B82B08@VS2.hdi.tvcabo> <3FE991DD.5060301@noplace.com> <3FEA5C82.8050309@noplace.com> <3FEB047A.1040100@noplace.com> NNTP-Posting-Host: pip1-5.std.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1072550630 21306 192.74.137.185 (27 Dec 2003 18:43:50 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Sat, 27 Dec 2003 18:43:50 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:3855 Date: 2003-12-27T13:43:50-05:00 List-Id: "Dmitry A. Kazakov" writes: > Just allow "with" everywhere "use" is allowed. Then "use A.B" could > literally imply "with A.B". That would defeat the whole purpose of with_clauses. The point of with's is that you can see a summary of the interconnections between compilation units all in one spot, right up front. The most important aspects of a software design are: what are the pieces, and which pieces interact with which other pieces. Scattering this information all over the place is a bad idea, IMHO. Why bother with with at all? You might as well just say that any reference to a name automatically imports that name, as necessary. There are other languages that do something like that. > So: > > package A is > package B is > ... > end A; > > with A.B; -- This is OK, implies with A, as usual > package C is > with A.B; -- This is also OK > > BTW, this would give numerous addititional possibilities: > > package X is > -- public things > > private > with Something_Implementational.Not_To_Expose; It is indeed unfortunate that you can't have with's that apply only to the private part. IMHO, the language would be better if the with's appeared *inside* the package, either at the start of the visible part, or the start of the private part, or the start of the body. But I want them together, up front (for each of these parts) -- not scattered all over. By the way, I think there's an AI allowing with's to apply to the private part. Something like "with private X" or "private with X". It still has to go outside, *before* the text of the package spec, which is unfortunate. My suggestion of putting the with's inside is way too big a change to consider seriously. - Bob