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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,50fdde6c2a894ef1 X-Google-Attributes: gid103376,public From: "Steve Doiel" Subject: Re: Difference between C++'s templates and Ada's generic units Date: 1998/01/26 Message-ID: <34cd4c4c.0@news.pacifier.com>#1/1 X-Deja-AN: 319543634 References: <6ai045$50p40@beaker.nit.gwu.edu> X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3 Newsgroups: comp.lang.ada Date: 1998-01-26T00:00:00+00:00 List-Id: Samir N. Muhammad wrote in message <6ai045$50p40@beaker.nit.gwu.edu>... >Hello everybody, > >Would someone explain whether there is a difference between C++'s templates >and Ada's generic units. I checked the WEB document by David Wheeler, >"Ada,C,C++, and Java vs. The Steelman", and found out that the only difference >is that C++'s templates are not yet standardized. Are there any essential >differenes between C++ and Ada support for generic programming. > While I haven't done a lot of programming with C++'s templates, or much with Ada's generics, I can say that Ada's generics are simpler to use. My experience with C++ templates was frustrating. While using a standard class library I didn't override a virtual function that I was supposed to. The result was a compile time error deep inside the template code. It was very difficult to interpret and find the source of the problem. My experience with Ada's generics was far less frustrating. All of my compile time errors appeared in my generic spec module (imagine that!). SteveD