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 12:41:16 PST Path: archiver1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!dialin-145-254-045-077.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 21:47:12 +0100 Organization: At home Message-ID: References: <468D78E4EE5C6A4093A4C00F29DF513D04B82B08@VS2.hdi.tvcabo> <3FEA5C82.8050309@noplace.com> <3FEB047A.1040100@noplace.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: dialin-145-254-045-077.arcor-ip.net (145.254.45.77) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.uni-berlin.de 1072644074 15701613 145.254.45.77 ([77047]) User-Agent: KNode/0.7.2 Xref: archiver1.google.com comp.lang.ada:3900 Date: 2003-12-28T21:47:12+01:00 List-Id: Robert A Duff wrote: > Georg Bauhaus writes: > >> Dmitry A. Kazakov wrote: >> : Or with getting rid of with clauses at all, as Robert Duff mentioned in >> : passing! I never liked them. How about that? > > For the record, I was not *advocating* the idea of getting rid of > with_clauses. I *like* with_clauses, because they tell you, right up > front, what imports what. > > I have some minor nitpicks. I don't like using "with" as a verb (I > would have chosen "use" or "import" for this purpose). It's annoying > that you can't apply a with_clause to a private part. But this is pretty consistent with the idea of telling what will be imported up front. Either you say, "with" is a global thing, so it has to be put before anything else. Or you say, OK it is global, but let's pretend it is not. After all, semantically, one cannot "with" something in one part of a compilation unit and not to do it in another. Or is it just about, whether the compiler should allow the sequence of characters specified after "with" as a name prefix? > And the trivial > issue this thread has been endlessly discussing -- it seems silly to me > to say "with X; use X;", when "use X;" would suffice. > But no, I never meant to imply that it would be a good idea to get rid > of with_clauses! I just meant that *if* you allow with_clauses to be > scattered all over (a bad idea, IMHO), you might as well get rid of them > (an equally bad idea, IMHO). They are equivalent, but I am not so sure that they are bad. >> That is what has been driving me up the wall when debugging >> Java classes. > > Exactly! I said "some other languages" don't have something like > with_clauses, but let you just refer to external stuff willy-nilly. > I had Java in mind when I wrote that. I very much agree with Georg > Bauhaus that that's a flaw in Java, and I disagree with Dmitry > A. Kazakov that Ada should mimic that flaw. > > Of course, I hope we all realize that no such changes can ever be made > to Ada, for compatibility and cost reasons. So we're really talking > about "what if?" here, as an interesting exercise (not a realistic > change proposal for Ada). Yes, this all is hypothetically > What if we were designing a language from > scratch, with similar goals to Ada? Would we eliminate with_clauses, or > allow them to be scattered all over? I say, no. What is the idea behind "with"? A linker implemented on the basis of human brains? A contract? If the latter then not only "private with", but also presently allowed "with" in the bodies has to be outlawed. What is the use of such a contract otherwise? It just makes no sense. And if it could, then I would prefer "without" clause, to specify which units are *not* referenced by a unit! -- Regards, Dmitry A. Kazakov www.dmitry-kazakov.de