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: Manifesto against Vector Date: Sun, 09 May 2004 22:33:55 +0200 Organization: At home Message-ID: <2g7istF5b6lqU1@uni-berlin.de> References: <7v9k901htdtm86kg9umqhptirt7vmjcr3m@4ax.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 loPG+2vqZf0KyrAkkLE3SwkQOFGG0iq4J1ePFoySoo84lTWxo= User-Agent: KNode/0.7.2 Xref: controlnews3.google.com comp.lang.ada:397 Date: 2004-05-09T22:33:55+02:00 List-Id: Georg Bauhaus wrote: > Dmitry A. Kazakov wrote: > :>And if there is redundancy > :>in explicitness, this does help analysing, understanding, and > :>debugging programs, doesn't it? > : > : Not at all. In most cases it is just an importunate noise. > : > :>In particular if the program text > :>is not correct. > : > : How could that help, keeping in mind, that use-haters are pushing for > : using full names everywhere? > > Does the 3k lines body of package X depend on Foo.Bar, or > is there an occurence of the string Foo.Bar somewhere in the > body of package X? > > If this argument were taken to Eiffel, would you want the compiler > to figure out what the inheritance relations for the class > in question is, by having it analyse the class and its closure? You must be talking about Prolog. (:-)) > That is instead of specifying what the inheritance hierarchy > (and thus package dependeces) is? This comparison is interesting, but I think it is not exact. We should distinguish type/package relations from ad hoc dependencies. Non trivial inheritance and child packages are design decisions. These are taken early, have a great influence and thus deserve manifesting. An ad hoc use of types (creating simple subtypes) and packages (with/use-ing) is much more occasional and fluid. Note that we have it for types too. Constrained subtypes have a lightweight syntax. Constant/in/out/in-out/access subtypes are completely ad hoc, they are anonymous and matched by-structure (i.e. through analyze, exactly as you said). With by-reference vs. by-value subtypes Ada goes even further and requires no explicit declaration at all. So in my view, Ada made a great step forward by introducing inherent package relations in the form of child packages. It could do that even better by allowing multiple parents (a counterpart of so hated multiple inheritance). Doing so there is no more reason to keep "with" at least when there is an explicit "use". -- Regards, Dmitry A. Kazakov www.dmitry-kazakov.de