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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no 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-28 03:39:33 PST Path: archiver1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!dialin-145-254-038-053.arcor-ip.NET!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Other Ada Standards (was Re: SIGada Conference) Date: Sun, 28 Dec 2003 12:45:54 +0100 Organization: At home Message-ID: References: <468D78E4EE5C6A4093A4C00F29DF513D04B82B08@VS2.hdi.tvcabo> <3FE991DD.5060301@noplace.com> <3FEA5C82.8050309@noplace.com> <3FEB047A.1040100@noplace.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: dialin-145-254-038-053.arcor-ip.net (145.254.38.53) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.uni-berlin.de 1072611571 13909074 145.254.38.53 ([77047]) User-Agent: KNode/0.7.2 Xref: archiver1.google.com comp.lang.ada:3881 Date: 2003-12-28T12:45:54+01:00 List-Id: Robert A Duff wrote: > "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. Should a reader see these interconnections? Couldn't we bring the famous "it is a question of a good IDE" argument here? > 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. Again, true. But it is not compilation units which interacts, but rather smaller objects. > 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. Absolutely. I think that the compilers are enough mature to go without with. Can we go so far? [with-ing generic children is really boring] Will implying of "with" be backward compatible? >> 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. To enforce this we would need to formally define "start-of-a-part" in RM. IMO it is easier to allow it everwhere with a stylistic note that it is better to place it as early as possible in the text. > 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. -- Regards, Dmitry A. Kazakov www.dmitry-kazakov.de