comp.lang.ada
 help / color / mirror / Atom feed
From: euamts@eua.ericsson.se (Mats Henricson)
Subject: Re: c++ vs ada results
Date: 24 Jun 91 13:16:12 GMT	[thread overview]
Message-ID: <1991Jun24.131612.17502@eua.ericsson.se> (raw)
In-Reply-To: 3776@sirius.ucs.adelaide.edu.au

andrewd@chook.adelaide.edu.au (Andrew Dunstan) writes:
>In article <1991Jun18.122812.18190@eua.ericsson.se>,
>euamts@eua.ericsson.se (Mats Henricson) writes:

>|> I have started to see two different kinds of programmers in C++:
>|> 1. Library designers
>|> 2. Library users
>|> 
>|> The first kind of programmers is doing some tricky nasty hacking behind the
>|> scenes of the interface of the classes, to satisfy the second kind of users.
>|> 
>|> I have so far only done programming as a library designer, and I think that
>|> is *VERY* difficult if you try to produce code that is:
>|> a) fast
>|> b) not wasting memory
>|> c) usable
>|> d) reusable (in terms of subclasses)
>|> e) etc
>|> f) etc
>|> g) etc
>|> 
>|> If you, on the other hand, have a well designed class library to build from,
>|> I think C++ is a beautiful and easy language to use.

>Yes, but writing libraries should not be so hard. It isn't in Ada.
>You've really made a point in Ada's favour.

To start with, I must admit that I haven't even seen one line of Ada code
in my entire life. I know that is a weak point if you are discussing the
pros and cons of C++ and Ada, but the thing is that I jumped into this
discussion just to make a statement on what *I* think on the difficulties
of writing code in C++. I think that depends on what kind of programmer
you are (see above).

I have written a string class consisting of 70 pages of code (including
test code). I do not think that the actual writing was difficult, even
though I of course had several bugs that was hard to find. After writing
this class (it's actually two classes, along the main route of NIH,
libg++ and the others) I learned more about library design from Mike
Vilot, Jonathan Shopiro and Martin Carroll (courses). I now realize that
just writing OK code is no big deal. Writing code that is optimal for
many different users (see above) is HARD! If you claim that writing
optimal component libraries in Ada is easy, I think you're wrong. I say
this just from intuition, since I have no Ada experience. From what I have
learned from programming, there is NO way you can make a language that
makes it easy to do libraries. This is because library design is much a
matter of design, i.e.:
1. What trade-offs are you taking (space/time) ?
2. Which kind of error-handling mechanism are you taking ?
3. Which features do you include in your code library ?
4. Which "class" is in charge in a complex UI-application ?
5. How do you avoid redundant code in your library ?
6. How do you achieve localized cost (you only pay for what you use) ?
7. How do you avoid complexity ?
8. How do you structure the library documentation ?

Unless Ada is godsent (Something I doubt ;-) you have to wrestle with
these questions when you write packages in Ada as well.

Well, I suppose this is what I had to say...

Mats Henricson

  parent reply	other threads:[~1991-06-24 13:16 UTC|newest]

Thread overview: 83+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1991-06-12 16:47 c++ vs ada results 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-14 17:56   ` GNU c++ bashing (was Re: c++ vs ada results) Eli Brandt
1991-06-16  2:48   ` c++ vs ada results 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-20 14:35             ` chief programmer team organizations was (c++ vs ada results) Alex Blakemore
1991-06-21 12:40               ` chief programmer team organizations was (c++ vs ada results)H house ron
1991-06-21 15:47                 ` chief programmer team organizations Joseph Beckenbach {Adapter Software Release Engr}
1991-06-21 22:25                 ` chief programmer team organizations was (c++ vs ada results)H Jim Showalter
1991-06-26 22:18                   ` Dan Weinreb
1991-06-21 22:04               ` chief programmer team organizations was (c++ vs ada results) Lars P. Fischer
1991-06-23  3:17                 ` Jim Showalter
1991-06-24 13:23                 ` Jim Hargrove
1991-06-21 22:21               ` Jim Showalter
1991-06-22  2:14               ` John Nagle
1991-06-23  3:23                 ` Jim Showalter
1991-06-23 13:21                   ` David Feustel
1991-06-23 18:54                     ` Jim Showalter
1991-06-27 15:30                     ` Dan Weinreb
1991-06-24  4:00                   ` Marco S Hyman
1991-06-24 20:23                     ` Stanley Friesen
1991-06-26  0:37                       ` Jim Showalter
1991-06-24 20:29                     ` Jim Showalter
1991-06-24 18:29                   ` John Nagle
1991-06-25 18:38                     ` Jim Showalter
1991-06-25 19:30                       ` Christopher Warack
1991-06-25 20:06                     ` chief programmer team organizations John Baldwin
1991-06-24  9:36                 ` chief programmer team organizations was (c++ vs ada results) George C. Harrison, Norfolk State University
1991-06-25 13:42                   ` Harry Erwin
1991-06-26 16:15                 ` Bob Martin
1991-06-19 18:36           ` c++ vs ada results 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 [this message]
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
  -- strict thread matches above, loose matches on Subject: below --
1991-06-20 16:24 Chuck Shotton
1991-06-22  3:24 ` Thomas M. Breuel
     [not found] <164741@<1991Jun12>
1991-06-20 17:58 ` ryer
1991-06-24 14:44 ` ryer
1991-06-27 12:34 Chuck Shotton
1991-06-27 18:24 Ray Diederich, 301-294-8400
1991-07-01  5:15 Andrew Dunstan
1991-08-13 14:29 cis.ohio-state.edu!zaphod.mps.ohio-state.edu!qt.cs.utexas.edu!cs.utexas.e
1991-08-13 22:08 David Emery
1991-08-14  5:03 Mike Feldman
1991-08-14 14:41 Fred Stluka
1991-08-14 18:25 Doug Smith
1991-08-14 18:40 cis.ohio-state.edu!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!utgpu!
1991-08-14 19:15 Doug Smith
1991-08-14 20:15 Jim Showalter
1991-08-15 13:30 Paul Baker - CTA
1991-08-15 15:40 Andy Davidson
1991-08-16 17:56 Doug Smith
1991-08-29 16:54 David Emery
1991-08-30  7:24 Ma ts Henricson
replies disabled

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