comp.lang.ada
 help / color / mirror / Atom feed
From: Brian Rogoff <bpr@shell5.ba.best.com>
Subject: Re: Ada Generic vs. C++ Templates
Date: Wed, 04 Apr 2001 16:17:54 GMT
Date: 2001-04-04T16:17:54+00:00	[thread overview]
Message-ID: <Pine.BSF.4.21.0104040903090.9833-100000@shell5.ba.best.com> (raw)
In-Reply-To: <3ACA4A12.9FC665D5@bigfoot.com>

On Tue, 3 Apr 2001, Francois Godme wrote:
> I still don't think we can all rest on our laurels.
> 
> The C++ STL is, by far, a piece of code larger than all the Ada generic units
> combined you can find in the Ada95 standard. GCC compiles the STL, so
> do Visual C++ and aCC. Isn't it enough signs of evidence?
> 
> Even more, now that the language has been written down as a standard,
> what can stop the convergence of the C++ compilers to the standard?

Good points.You could also mention that it was some time before Ada
generics were robust too. Stepanov mentions in some of his early STL
papers that lots of Ada compilers couldn't handle his code. 

Contrary to what someone else wrote, C++ templates do give you extra
expressive power over Ada in some areas. Examples? Sure

http://www.eecs.harvard.edu/~nr/pubs/error-abstract.html

Would I want to write that in C++? No, I much prefer (OCa)ML, but the
point is that automatic instantiation of template gives you a crude form 
of parametric polymorphism, whereas Ada generics are *not* parametric 
polymorphism, papers by Barbey et al notwithstanding. 

Is the converse true too? Sure Ada generics provide type constraints, 
can take subprogram arguments (and simulate *some* cases of downward
funargs), can be packages and take package arguments, etc. 

As I've said many times, automatic instantiation would be very nice, and 
would tip the scales totally to Ada IMO. But it isn't going to happen. 
If that bothers you too much, don't use Ada. 

Anyways, the responses to the question have been depressing, with lots of
finger pointing at some old Mozilla site. If I were the original poster
I'd have guessed by now that Ada programmers are very defensive, and
dumber than mud, since they can't answer simple questions. :-)

-- Brian





  reply	other threads:[~2001-04-04 16:17 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-02 14:28 Ada Generic vs. C++ Templates Josef Widder
2001-04-02 14:38 ` Ted Dennison
2001-04-02 20:57   ` Francois Godme
2001-04-02 21:26     ` Ted Dennison
2001-04-03  0:53       ` David Starner
2001-04-04  7:12         ` Pascal Obry
2001-04-04 12:37         ` Stephen Leake
2001-04-04 14:16         ` Ted Dennison
2001-04-03 22:09       ` Francois Godme
2001-04-04 16:17         ` Brian Rogoff [this message]
2001-04-04 16:21         ` Jeffrey Carter
2001-04-04 16:49           ` Ayende Rahien
2001-04-05 22:31             ` Colin Paul Gloster
2001-04-04 16:56           ` Ted Dennison
2001-04-04 17:02             ` Ayende Rahien
2001-04-05  0:35         ` James Rogers
2001-04-05  3:38           ` DuckE
2001-04-05 14:25             ` Marin David Condic
2001-04-05 20:32               ` Robert A Duff
2001-04-05 21:04                 ` Marin David Condic
2001-04-06 16:19                   ` Robert A Duff
2001-04-06  0:37             ` James Rogers
2001-04-06 10:38               ` Colin Paul Gloster
2001-04-11  3:33                 ` Stephen Howe
2001-04-11 14:33                   ` Colin Paul Gloster
2001-04-04 13:24 ` Georg Bauhaus
2001-04-05  8:46   ` Jean-Marc Bourguet
2001-04-04 17:30 ` Ehud Lamm
2001-04-05 22:04   ` Colin Paul Gloster
2001-04-10  7:03     ` Simon Wright
2001-04-13 14:11       ` Pat Rogers
2001-04-17  8:27         ` Colin Paul Gloster
2001-04-08  5:00 ` Lao Xiao Hai
replies disabled

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