comp.lang.ada
 help / color / mirror / Atom feed
From: milod@netcom.com (John DiCamillo)
Subject: Re: Is Ada the future? [was: Is C++ the future?]
Date: Tue, 4 Oct 1994 17:42:50 GMT
Date: 1994-10-04T17:42:50+00:00	[thread overview]
Message-ID: <milodCx5t7E.56p@netcom.com> (raw)
In-Reply-To: 36q7m5$4ef@Starbase.NeoSoft.COM

Let me start by thanking you all for taking the time
to think before you respond to this thread.  I'm
really enjoying it and I'm learning a lot.

My point in carrying this on in public is to help
you (the Ada community) hone your arguments on some-
one in the commercial/C++ community.  'Cause if you
can't come up with some good ones, dual-use is doomed.

dweller@Starbase.NeoSoft.COM (David Weller) writes:
>John DiCamillo <milod@netcom.com> wrote:
>>dweller@Starbase.NeoSoft.COM (David Weller) writes:
>>
>>>	Range checking,
>>Trivially provided in C++ classes that need it.
>>
>We must have wildly different opinions of "trivial" then.

I'm sure we do: you are writing an array
class, and I am using one.

>problem with C++ is that it requires the programmer to write
>defensively.  "Caveat hackus", if you will.  Type checking, for
>instance, is provided only at the class level.  It's not possible to
>create an integer of type Oranges and one of Apples without artificially
>mashing them into classes and then going through an array of gyrations 
>to overload all operations.  The typedef is merely a synonym, 
>not a new type.

I agree with all this, but so what?  That's
what commercial class libraries are for.
Admittedly, the market isn't quite there yet
because of standardization and support issues,
but in general, I can choose to buy one of
several different libraries that will provide
the support I need.

>This is so fundamental to the difference 
>between Ada and C++ that I dare say it's the root
>of misunderstanding between the two "camps" (if one feels compelled
>to segregate the two -- I write in both languages, so I guess I'm a
>pariah :-).  The fundamental issue is this: Ada starts from the side
>of reliability and requires the programmer to unravel the safety
>where needed.  C++ starts from the side of "flexibility" (lack of
>safety, depending on your perspective :-) and forces the programmer
>to wrap up their nugget of data (members) with a layer of protection
>(classes). 

I agree with all this too, except that it's
not a source of misunderstanding.  Most of
the C++ programmers I know simply could not
care less about whether Ada9x is an OOPL or
not.  And this includes a guy whose first
language (in college) was Ada83.

>>>	Type checking within generics,
>>C++ provides this for every definition of that
>>phrase that I can think of.  I can only assume
>>that you mean something else.  Please elaborate.
>>
>Templates:   Grrrrr.   Write a class template.  Then repeat the
>template parameters _everywhere_.  Repeat them in your parameter
>lists, repeat them in your member functions, repeat them in your
>declarations.  "Ad naseum" is an understatement.  What's that got to
>do with reliability?  Not a damn thing, but it makes a BIG difference
>in readability.

Perhaps.  Although readability in C++ can
be helped by a thoughtful selection of
template parameter names.

>Again, type checking is loose, both in creation and elaboration of
>templates.  I owe you a better explanation on this one, but I'm short
>on time right now (should be doing my work on the Booch Component
>translation).

Yeah, slacker! ;-)

>>>	safe pointers
>>Can be provided, but not legislated.  In any
>>case, for programs of more than trivial com-
>>plexity, raw pointers are generally wrapped
>>in safe classes.
>>
>Wrap a pointer in a class and protect it?  Well, so
>much for simplicity....

But we really do this, and its just not that
big a deal.  We use handle/body classes to
get pass-by-value semantics and polymorphism
at the same time.  Instance management is
handled in a base class, and I don't have to
think about it.  We don't use built in arrays
at the application level, and in general
don't use pointers in unsafe ways.

>>More seriously, have ya got anything else?
>Yes, but out of time (as mentioned before).  I _do_ owe you a better
>explanation (I sure wouldn't be convinced by my reply here alone).
>Maybe others can chime in without letting this turn into a language
>flamewar (I know, I'm probably asking too much :-)

Yes, I would appreciate that too!

Oh, and thank you for the references yesterday.
I'm preparing a rebuttal to the 9x-cplus paper,
but I need some clarification on Ada 9x first:

How does polymorphism (dynamic dispatch) work
in Ada 9x?

Is Ada Covariant, Contravariant, or Invariant?

Could someone please explain "generic derived
types and generic formal packages" and how
they are different than C++ templates?

-- 
    c'iao,
    milo
================================================================
    John DiCamillo                        Pinin' for the fjords?
    milod@netcom.com                  What kind of talk is that?



  reply	other threads:[~1994-10-04 17:42 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-09-29 20:08 Is Ada the future? [was: Is C++ the future?] John DiCamillo
1994-09-30 13:45 ` David Weller
1994-10-01 21:40   ` John DiCamillo
1994-10-03  9:53     ` Robert I. Eachus
1994-10-03 20:41       ` John DiCamillo
1994-10-04  8:41         ` Robb Nebbe
     [not found]           ` <85C825A689A@annwfn.com>
1994-10-13 14:40             ` John Volan
1994-10-13 21:14               ` Matt Kennel
1994-10-14  0:37                 ` Robert Dewar
1994-10-14 10:16                 ` Robb Nebbe
1994-10-14 20:43                   ` Bob Duff
1994-10-13 22:01           ` Val Kartchner
1994-10-14  1:38             ` Robert Dewar
1994-10-14  9:31             ` Robb Nebbe
1994-10-14 16:16               ` Child packages [nn,pedo,incest,cons] Robert Firth
1994-10-14 17:13                 ` Robert I. Eachus
1994-10-17  8:18                   ` Robb Nebbe
1994-10-17 11:52                     ` Robert I. Eachus
1994-10-17 21:54                       ` Bob Duff
1994-10-18 10:30                       ` Child packages Robb Nebbe
1994-10-18  9:37                         ` Robert I. Eachus
1994-10-18 19:09                           ` Robert Dewar
1994-10-19 11:03                             ` Robert I. Eachus
1994-10-19 16:24                               ` Norman H. Cohen
1994-10-19 23:13                                 ` Robert Dewar
1994-10-20 14:06                                   ` Norman H. Cohen
1994-10-20 11:09                                     ` Robert I. Eachus
1994-10-20 19:02                                       ` Benjamin Ketcham
1994-10-20 17:08                                         ` Robert I. Eachus
1994-10-20 16:37                                     ` Bob Duff
1994-10-20 16:40                                       ` Bob Duff
1994-10-21 14:02                                       ` Mark Biggar, 5172
1994-10-21  8:48                                     ` Robb Nebbe
1994-10-19 18:54                               ` Robert Dewar
1994-10-20  0:27                               ` Matt Kennel
1994-10-20  8:21                                 ` Magnus Kempe
1994-10-20 13:52                                 ` John Volan
1994-10-19 16:19                             ` Norman H. Cohen
1994-10-04 14:44         ` Is Ada the future? [was: Is C++ the future?] Robert Dewar
1994-10-04 15:53           ` Richard Kenner
     [not found] ` <36h4pc$9dd@starbase.neosoft.com>
1994-09-30 20:15   ` Benjamin Ketcham
1994-10-02 16:30   ` Robin Rowe
1994-10-02 18:00     ` David Weller
1994-10-03 15:55       ` Netspeak: What is "trolling"? Norman H. Cohen
1994-10-03 17:04         ` Kenneth Aubey 913-4481
1994-10-03 21:06       ` Is Ada the future? [was: Is C++ the future?] John DiCamillo
1994-10-04  0:29         ` David Weller
1994-10-04 17:42           ` John DiCamillo [this message]
1994-10-05  8:18             ` Magnus Kempe
1994-10-05 13:49             ` Tucker Taft
     [not found]         ` <36q7m5$4ef@starbase.neosoft.com>
1994-10-04 17:55           ` Robin Rowe
1994-10-04 22:42         ` Tucker Taft
1994-10-03  9:22     ` Andrew Lees
1994-10-03 21:31       ` John DiCamillo
1994-10-04 23:29         ` John DiCamillo
1994-10-05  3:52           ` Robin Rowe
1994-10-05 13:15             ` Robert Dewar
1994-10-05 13:54           ` David Weller
     [not found]             ` <36uhnl$4c1@gnat.cs.nyu.edu>
     [not found]               ` <37dp17$gp6@goanna.cs.rmit.oz.au>
1994-10-11 13:37                 ` Robert Dewar
1994-10-19 11:24               ` Stephen J Bevan
1994-10-19 15:51                 ` Robert Dewar
1994-10-25 12:21                   ` Stephen J Bevan
1994-10-05 17:08           ` Ted Dennison
     [not found]     ` <36msgr$qq2@starbase.neosoft.com>
1994-10-04  7:21       ` Ada compared to C++ Robin Rowe
1994-10-05  6:44         ` Bob Kitzberger
1994-10-05 12:02           ` Robert Dewar
1994-10-05 18:20           ` Bob Kitzberger
1994-10-05  8:44         ` Magnus Kempe
1994-10-05 19:55           ` David Weller
     [not found]   ` <1994Oct6.133002.1@rapnet.sanders.lockheed.com>
1994-10-16  3:30     ` Mark S. Hathaway
replies disabled

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