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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a270a1fc28d4f812 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-22 02:18:52 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!212.74.64.35!colt.net!newspeer.clara.net!news.clara.net!newsfeed01.sul.t-online.de!t-online.de!news.csl-gmbh.net!news-fra.pop.de!schlund.de!news.online.de!not-for-mail From: "Dr. Michael Paus" Newsgroups: comp.lang.ada Subject: Re: OOD in Ada? Date: Sat, 22 Jun 2002 11:18:50 +0200 Organization: 1&1 Internet AG Message-ID: <3D1440FA.9030409@ib-paus.com> References: <3d135676$0$8511$cc9e4d1f@news.dial.pipex.com> NNTP-Posting-Host: p508305df.dip0.t-ipconnect.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.online.de 1024737531 2871 80.131.5.223 (22 Jun 2002 09:18:51 GMT) X-Complaints-To: abuse@online.de NNTP-Posting-Date: 22 Jun 2002 09:18:51 GMT User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.0) Gecko/20020530 X-Accept-Language: en-us, en Xref: archiver1.google.com comp.lang.ada:26589 Date: 2002-06-22T09:18:51+00:00 List-Id: David Crocker wrote: > I know that Ada95 tries to support O-O development, but from my perspective > as an OO developer but Ada novice, it appears to me that any attempt to > implement a large OO design in Ada will run into the following problems: > > 1. The infamous "withing" problem (i.e. it is not possible to declare 2 > classes A and B, each in its own package, such that A has a method taking a > paremeter of type "access B", and B has a method with a parameter of type > "access A"); and Yes, this is also considered a problem by other people. This in an excerpt from the JGNAT user guide: "A long-standing programming problem that is difficult to solve in Ada is that of creating mutually dependent package specifications. The problem is that Ada package specifications aren't allowed to depend on each other. There are various possibilities for working around this restriction in specific cases, generally involving levels of indirection and syntactically heavy programming idioms. However, these workarounds are too cumbersome for practical use, [...]" To overcome this problem the GNAT people even introduced a language extension "with type". This feature is available in any recent GNAT implementation although it does not seem to work (For the example I have used the compiler seems to go into an endless loop). In order to activate it you have to use the -gnatX switch. For a more extensive explanation of how it works see the JGNAT user manual. > 2. The lack of a "dot" notation (or anything similar) for calling a member > method, making the code hard to read and hard to determine where dynamic > binding may be taking place. This is indeed one of the more serious problems. Many people in this group will argue that technically it does not make any difference whether you have a "dot" notation or not and this is probably right. But from the point of readability it is a big difference. This may of course be just a matter of taste but in my daily work I have met a lot of people who have real difficulties to understand what this OO stuff is all about. I think it is much easier to explain and understand in a language like Java than it is in Ada. > So: is there anyone on this list who does serious object-oriented > development in Ada and would like to comment? Well, this depends of course on how you define serious. What you mostly find are projects where some OO features are used occasionally but not consistently. Just using a tagged type here or there certainly does not qualify as "serious object-oriented development". Personally I have not yet seen any Ada project where a rigorous OO design and implemenation have been performed. In some companies the use of any OO features of the language is even strictly forbidden. Michael