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-04 11:44:07 PST Path: supernews.google.com!sn-xit-03!supernews.com!nntp.cs.ubc.ca!logbridge.uoregon.edu!news.huji.ac.il!not-for-mail From: "Ehud Lamm" Newsgroups: comp.lang.ada Subject: Re: Ada Generic vs. C++ Templates Date: Wed, 4 Apr 2001 20:30:39 +0300 Organization: The Hebrew University of Jerusalem Message-ID: <9afpi0$irv$1@news.huji.ac.il> References: NNTP-Posting-Host: di2-118.dialin.huji.ac.il X-Trace: news.huji.ac.il 986409345 19327 132.64.12.118 (4 Apr 2001 18:35:45 GMT) X-Complaints-To: abuse@news.huji.ac.il NNTP-Posting-Date: Wed, 4 Apr 2001 18:35:45 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2014.211 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211 Xref: supernews.google.com comp.lang.ada:6473 Date: 2001-04-04T20:30:39+03:00 List-Id: Josef Widder wrote in message news:MPG.1532ab1cc6ed7b4989682@news.chello.at... > As project for university i'd like to compare the power of the Ada > Generic construct relative to C++ templates. > > Could someone please tell me where to find good articles on the generic > construct ? > In fact this is a pretty large subject. I'd restrict it to something more managable (like "automatic instantiation vs. explicit instantiation" or the way generic paramaters are specified etc.). Some useful (I think) references are: * the Ada83 Rationale chapter on generics * Alexander Stepanov writings and intervies (some are available on the net, and I gave URLs in this newsgroup a couple of times). He discusses some this he considers shortcomings in Ada, as opposed to C++, as related to creating the STL. * You may want to check specific uses. The are several examples of C++ temlate libraries that are hard if not impossible to mimic in Ada. Esp. attempts at providing high-order programming facilties. (I don't have a URL handy, but a search at http://lambda.weblogs.com should get you started. You may also raise your question at that site). * Another thing that may be interesting is to check specific programming styles. For example Ada's formal package paramters are a bit like using classes to specify generic parameters, but they induce a different programming style. Any way, as I said, this is really a big subject. I suggest you check some of these and focus your research on something a bit more specific. (Or more general, like paramateric polymorphism in general). I'd be glad to help. Email me or use the above mentioned site. (Or here, of course). Good luck, Ehud Lamm