comp.lang.ada
 help / color / mirror / Atom feed
From: netcomsv!jls@apple.com  (Jim Showalter)
Subject: Re: c++ vs ada results
Date: 14 Aug 91 20:15:52 GMT	[thread overview]
Message-ID: <1991Aug14.201552.24023@netcom.COM> (raw)

smithd@software.org (Doug Smith) writes:

>As an early attempt to use generics
>for a library of reusable code, they have stood up very well.  But
>as an example of what can be accomplished with generics, they are
>slightly dated.

The C++ version benefitted from several years of 20-20 hindsight.
What would be interesting to me would be for the Ada version to
be rewritten using everything that has been learned about Ada
and C++ in those years, and _then_ comparing them.

I concede, however, that the result is still unlikely to be as
dense as the C++ version, precisely because of the lack of inheritance.
Consider, for example, what happens when you try to implement a
singly-linked list generic and a doubly-linked list generic: since
the data structures are fundamentally different, you wind up having
to write two different packages even though they are quite similar in
a variety of ways.

On the other hand, this still isn't a truly fair comparison. The
C++ version exploits both inheritance and genericity ("templates")
to achieve its density. The Ada version has only genericity at its
disposal, and so naturally comes up short (well, long--but you know
what I mean). But consider this: many of the people who extoll the
virtues of inheritance do so without taking genericity into account.
My guess is that the C++ version written with inheritance but not
templates would be about as cumbersome as the Ada version written
with genericity but not inheritance. And I also think that both
versions would be about the same size (within a small constant
attributable to syntactical differences and naming conventions) if
they were both written using inheritance and genericity. In sum,
I think both of these features are important to a language.
-- 
* Jim Showalter, software engineering consultant *
*         e-mail: jls@netcom.com                 *
*         voice : (408) 243-0630                 *
*         data  : (408) 984-5019                 *

             reply	other threads:[~1991-08-14 20:15 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1991-08-14 20:15 Jim Showalter [this message]
  -- strict thread matches above, loose matches on Subject: below --
1991-08-30  7:24 c++ vs ada results Ma ts Henricson
1991-08-29 16:54 David Emery
1991-08-16 17:56 Doug Smith
1991-08-15 15:40 Andy Davidson
1991-08-15 13:30 Paul Baker - CTA
1991-08-14 19:15 Doug Smith
1991-08-14 18:40 cis.ohio-state.edu!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!utgpu!
1991-08-14 18:25 Doug Smith
1991-08-14 14:41 Fred Stluka
1991-08-14  5:03 Mike Feldman
1991-08-13 22:08 David Emery
1991-08-13 14:29 cis.ohio-state.edu!zaphod.mps.ohio-state.edu!qt.cs.utexas.edu!cs.utexas.e
1991-07-01  5:15 Andrew Dunstan
1991-06-27 18:24 Ray Diederich, 301-294-8400
1991-06-27 12:34 Chuck Shotton
     [not found] <164741@<1991Jun12>
1991-06-20 17:58 ` ryer
1991-06-24 14:44 ` ryer
1991-06-20 16:24 Chuck Shotton
1991-06-22  3:24 ` Thomas M. Breuel
1991-06-12 16:47 alan dare
1991-06-12 19:15 ` Paul Martz
1991-06-12 20:17 ` Jim Showalter
1991-06-13 20:49   ` Paul Kohlmiller
1991-06-13 23:12     ` Bruce Jones
1991-06-16  2:48   ` Russ Nelson
1991-06-16  4:10   ` Sean Eric Fagan
1991-06-18  4:17     ` Jim Showalter
1991-06-18  8:33       ` Sean Eric Fagan
1991-06-18 21:53         ` Jim Showalter
1991-06-18 12:28       ` Mats Henricson
1991-06-18 22:06         ` Jim Showalter
1991-06-19 15:07           ` Dan Weinreb
1991-06-19 17:00           ` Doug Smith
1991-06-20 14:08             ` Steve Juneau
1991-06-20 19:56               ` Robert I. Eachus
1991-06-21 17:27                 ` David M Geary
1991-06-20 22:09               ` Paul Stachour
1991-06-21 17:03                 ` David M Geary
1991-06-23  3:14                   ` Jim Showalter
1991-06-26 22:13                 ` Dan Weinreb
1991-06-21 22:01               ` Jim Showalter
1991-06-19 18:36           ` Jim Showalter
1991-06-19 15:01         ` Dan Weinreb
1991-06-24  2:29         ` Andrew Dunstan
1991-06-24 10:06           ` David Emery
1991-06-24 13:16           ` Mats Henricson
1991-06-25  4:29           ` Tom McClory
1991-06-26  0:35             ` Jim Showalter
1991-06-26  1:26             ` Andrew Dunstan
1991-06-26 22:47               ` Jim Showalter
1991-06-27 15:47                 ` Alex Blakemore
1991-06-27 23:58                   ` Jim Showalter
1991-06-25 19:27           ` Jim Showalter
1991-06-23 23:59       ` CBW Consulting
1991-06-24 20:11         ` Jim Showalter
1991-06-12 21:27 ` Dan L. Pierson
replies disabled

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