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,7d14d8f47ca035bf X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-04-13 07:12:05 PST Path: supernews.google.com!sn-xit-03!supernews.com!cyclone2.usenetserver.com!news-out.usenetserver.com!easynews!cyclone.swbell.net!nnrp1.sbc.net.POSTED!not-for-mail From: "Pat Rogers" Newsgroups: comp.lang.ada References: <9afpi0$irv$1@news.huji.ac.il> Subject: Re: Ada Generic vs. C++ Templates X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: Date: Fri, 13 Apr 2001 09:11:28 -0500 NNTP-Posting-Host: 208.191.184.67 X-Complaints-To: abuse@swbell.net X-Trace: nnrp1.sbc.net 987171094 208.191.184.67 (Fri, 13 Apr 2001 09:11:34 CDT) NNTP-Posting-Date: Fri, 13 Apr 2001 09:11:34 CDT Organization: SBC Internet Services Xref: supernews.google.com comp.lang.ada:6860 Date: 2001-04-13T09:11:28-05:00 List-Id: "Simon Wright" wrote in message news:x7v66gdw82g.fsf@smaug.pushface.org... > Colin_Paul_Gloster@ACM.org (Colin Paul Gloster) writes: > > > Generics are used in The Booch Components (original Ada 83 version and > > subsequent Ada 95 port). Pre-Ada 95 it was written on page 192 of "The > > Design and Evolution of C++" [1] by Bjarne Stroustrup: > > "[..Grady Booch implemented the Ada [83] version of The Booch Components > > and he and Mike Vilot later implemented the C++ [of the time] version of > > The Booch Components. The Ada [83] version] is 125,000 [since you > > probably speak German I point out that 125,000 in English is equal to one > > hundred and twentyfive thousand (big); not one hundrend and twentyfive > > (small)] non-commented source lines compared to the C++ version's 10,000 > > [10000 not 10] lines - inheritance combined with templates can be a very > > powerful mechanism for organising libraries without loss of performance > > or clarity", referencing the second edition of "Object-oriented Analysis > > and Design with Applications" by Grady Booch. > > The C++ BCs I was given a copy of when I started maintaining the Ada95 > port have 29_000 non-comment source lines. The Ada95 port has 13_000 > non-comment source lines. Another point is that the Booch C++ design for the components is very -- repeat very -- different from the Ada design, so comparing sizes is difficult. It is not a matter of inheritance. There is in fact a lot of replication in the first design that he realized he could avoid, which has absolutely nothing at all to do with the language chosen. It is a matter of the second design benefiting from the first. Second, there is little inheritance in the C++ version. It is not the central design approach, as it would be in say Java or Eiffel. No one should conclude that inheritance is the central reason for the difference in size. --- Patrick Rogers Consulting and Training in: http://www.classwide.com Real-Time/OO Languages progers@classwide.com Hard Deadline Schedulability Analysis (281)648-3165 Software Fault Tolerance