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,fce663eaf40b52f6 X-Google-Attributes: gid103376,public Path: controlnews3.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: with and use again (was: Manifesto against Vector) Date: Sun, 09 May 2004 22:33:58 +0200 Organization: At home Message-ID: <2g7isvF5b6lqU2@uni-berlin.de> References: <1405834.Thf6udXj8g@linux1.krischik.com> Reply-To: mailbox@dmitry-kazakov.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: http://news.individual.net/abuse.html X-Trace: news.uni-berlin.de 7mlj8z1qCNAyEEWf/y4GXAt1SqHFiU2ha+HhiY0RY3j5BgWLw= User-Agent: KNode/0.7.2 Xref: controlnews3.google.com comp.lang.ada:398 Date: 2004-05-09T22:33:58+02:00 List-Id: Martin Krischik wrote: > Dmitry A. Kazakov wrote: > >> On Thu, 6 May 2004 10:55:01 +0100, Marius Amado Alves >> wrote: >> >>>On Thursday 06 May 2004 10:29, Dmitry A.Kazakov wrote: >>>> On Thu, 6 May 2004 09:03:54 +0200, "Jean-Pierre Rosen" >>>> > ... With is a library level >>>> > clause; it tells: "this unit, somewhere needs that unit". >>>> Why that should be told? I'd say that "with" is superfluous. >>> >>>I think it's to make it easier for the compiler. Without the with a lot >>>more semantic processing would be required, and probably an additional >>>pass. >> >> Huh, you will never extort that from a with-lover. (:-)) Guess why? >> Because if that were the only reason, then there would be no more >> arguments against use-ing without with-ing! > > We love with not because of compiler technicalities but because we like > our programs to be readable. To take your Example: > > procedure P (I : in Something); > > procedure P (I : in Foo.Something); > > Now imagine P inside at least 500 lines of specification with at least 5 > with statements. > > And now try to argue that the first version is more readable. I will not, because I agree. Of course, if you really want to have specifications 500 lines long. But this is not an argument *for* placing "with Foo" before that mess! It is an argument for full names. Which is a quite different thing. And note, usually a necessity to use full names indicates bad design of the packages involved, a good opportunity to review them! > Code is allways read more then written. That's because even when you > change code you have to read it first before you can make the change. And > read the change to make sure it's right. > > So read > write - allways and therefore read is more important the write. Absolutely right. -- Regards, Dmitry A. Kazakov www.dmitry-kazakov.de