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!news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsmm00.sul.t-online.de!t-online.de!news.t-online.com!not-for-mail From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: with and use again (was: Manifesto against Vector) Date: Mon, 10 May 2004 09:00:30 +0200 Organization: AdaCL Message-ID: <2904991.e3xbBgPSdu@linux1.krischik.com> References: <1405834.Thf6udXj8g@linux1.krischik.com> <2g7isvF5b6lqU2@uni-berlin.de> Reply-To: krischik@users.sourceforge.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.t-online.com 1084174210 06 9400 yQeNGyK6q4mCQ0- 040510 07:30:10 X-Complaints-To: usenet-abuse@t-online.de X-ID: TlF95YZdgeuWaoOqmepFzt21cH+nKBV5rY9hat-wCu1fA5JS359eZZ User-Agent: KNode/0.7.7 Xref: controlnews3.google.com comp.lang.ada:410 Date: 2004-05-10T09:00:30+02:00 List-Id: Dmitry A. Kazakov wrote: > 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. The GNAT specification if Ada.Text_IO has 445 lines. That's with comments but without the generic child packages. In GNAT they are special child packages drawn in by compiler magic. So 500 lines is not that much. > 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! True, I am from the Type.Object school - as opposed to the Types.Type school. But so are most UML -> Ada generators. You would not want to declare UML users bad designers, would you? With Regards Martin -- mailto://krischik@users.sourceforge.net http://www.ada.krischik.com