comp.lang.ada
 help / color / mirror / Atom feed
From: "Steve Doiel" <nospam_steved@pacifier.com>
Subject: Re: Difference between C++'s templates and Ada's generic units
Date: 1998/01/26
Date: 1998-01-26T00:00:00+00:00	[thread overview]
Message-ID: <34cd4c4c.0@news.pacifier.com> (raw)
In-Reply-To: 6ai045$50p40@beaker.nit.gwu.edu



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






  reply	other threads:[~1998-01-26  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-01-26  0:00 Difference between C++'s templates and Ada's generic units Samir N. Muhammad
1998-01-26  0:00 ` Steve Doiel [this message]
1998-01-26  0:00 ` Brian Rogoff
  -- strict thread matches above, loose matches on Subject: below --
1998-01-26  0:00 Samir N. Muhammad
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox