comp.lang.ada
 help / color / mirror / Atom feed
From: weisek@source.asset.com (Kevin Weise)
Subject: Re: "Subtract C, add Ada"
Date: 5 Jan 1995 11:07:22 -0500
Date: 1995-01-05T11:07:22-05:00	[thread overview]
Message-ID: <3eh5fq$ppv@source.asset.com> (raw)
In-Reply-To: 862035D1F1C@annwfn.com

In article <862035D1F1C@annwfn.com>, Fred McCall <merlin@annwfn.com> wrote:
>In <D1Msq8.4Hs@inmet.camb.inmet.com> mg@asp.camb.inmet.com Mitch Gart writes:
>
>>Ada leaves less room for single-keystroke
>>errors, such as the common C error of using = (assignment) instead of
>>== (comparison); 
>
>I've always been curious.  Just *where* is this a "common C error"?
>I've seen lots of beginners and non-C programmers claim it is, but I
>don't recall ever hearing of anyone who knew what they were doing (and
>who was using a real tool -- say, lint -- to check their code) making
>it. 

Well, Mr. McCall, I will attempt to respond to this in a fashion that
does not violate netiquette.  However, from previous threads here on
CLA, I believe this is one of your hot buttons.  The fact is, I know
lots of C/C++ people, and quite a few of them agree that this is a
common error they make {e.g., if (var = expr), rather than 
if (var == expr)}.  These people are not beginners; but some of them are
certainly hackers.  Nonetheless, as far as I've seen, this is a
well-known recognized source of common errors.  Certainly a good lint
program will question this usage; that's not at issue.  But I believe
that = vs. == was used as an example of single character errors that
make it through the compiler; certainly it is not the only one.  

>
>>its type-abstraction facilities reduce the need for
>>error-prone pointer manipulation; 
>
>Afraid this one doesn't seem to make sense.  How does being able to
>define a dozen incompatible types of integer "reduce the need for
>error-prone pointer manipulation"?  

While I agree with you that the introduction of multiple scalar types
in Ada programs can be abused, I don't think that is what was being 
referred to.  Two examples that come to my mind are the common practice 
of equating ints with pointers (although thankfully this is becoming
less  common these days) and the practice of passing non-scalar data by 
reference with the concommitant possible type mismatch between 
subprograms.  Thus, there is a point of view that makes sense.

>
>>and its modular facilities improve
>>teams' coordination of effort.
>
>Both languages are modular.  I'm not sure how this is a 'win' unless
>we're talking about totally inexperienced teams.
>
Agreed, both languages are modular.  But I think that the author may
have meant that strong typing is too easily circumvented in C; this
degrades coordination between teams.  This is not to say that
circumventing strong typing is unnecessary; I agree that it is
necessary sometimes.  I just prefer being better able to recognize when
its being done in code that I'm reading.

>>
>>This experience, McCormick notes, "has convinced all my faculty
>>colleagues to support teaching Ada in our beginning courses.  This
>>spring semester, the first studentw with Ada as their mother tongue
>>will enroll in my course.  I can only imagine what these teams will
>>accomplish".
>
>Well, Ada is certainly a better choice than C for a beginning language
>to teach design concepts, etc. However, that isn't necessarily saying a
>whole lot, since that wasn't what C was intended for. I'm also not sure
>why that would be considered a 'plus', unless the idea behind Ada was to
>come up with a good language for beginners; that wasn't the idea behind
>it.

Well, I think it says alot.  There's a belief that the way we think
about problem solving is directly related to the language(s) we know.
This is because language provides structure to the concepts and ideas we
use for thinking.  (This belief did not come out of computer science or
engineering, either.)  It only makes sense that a programming language
that provides good direct support for design issues as well should be of
great benefit.  Projects that I've seen that used Ada & failed did so
for a variety of reasons; but a frequent one was that it was designed with
a (FORTRAN, asembly, whatever) mindset but coded in Ada.  It shouldn't
take a rocket scientist to figure out that the effect is the same if you
do a literal translation from any other natural language into English.

However, for me, what really said a lot is that *none* of the teams that
used C finished the project, whereas one half to three fourths of the
teams that used Ada did.  Undoubtedly, you are a good software developer
and/or maintainer (even designer!); but perhaps there's more to the
assertions about language problems with C than you are willing to
accept.

----------------------------------------------------------------
Kevin J. Weise			weisek@source.asset.com
COLSA Corporation		Voice - (205) 922-1512 ext. 2115
6726 Odyssey Drive		FAX   - (205) 971-0002
Huntsville, AL  35806
{Standard Disclaimers about my opinions & my employer's opinions}
{... which are in conflict often enough}
----------------------------------------------------------------
"Admire those who seek the truth;
  avoid those who find it."		Marcel Proust



  parent reply	other threads:[~1995-01-05 16:07 UTC|newest]

Thread overview: 85+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-12-30 16:06 "Subtract C, add Ada" Mitch Gart
1995-01-03 19:04 ` whiting_ms@corning.com (Matt Whiting)
1995-01-05  4:31   ` Michael Feldman
1995-01-04 21:40 ` Fred McCall
1995-01-05  4:30   ` Richard Pattis
1995-01-05 16:07   ` Kevin Weise [this message]
1995-01-06 13:06   ` Jahn Rentmeister
1995-01-06 16:47     ` Laurent Gasser
1995-01-06 17:29       ` David Weller
1995-01-06 17:30         ` David Weller
1995-01-10 18:28       ` Bob Kitzberger
1995-01-06 23:36   ` Kenneth Almquist
1995-01-04 22:45 ` Jay M. Martin
1995-01-05  4:37   ` Michael Feldman
1995-01-05 18:08     ` Jay Martin
1995-01-05 23:56       ` Robert Dewar
1995-01-08  8:04         ` Jay Martin
1995-01-06  0:07       ` Michael M. Bishop
1995-01-10 21:30         ` Jay Martin
     [not found] <3etund$hnr@miranda.gmrc.gecm.com>
1995-01-12  9:56 ` Erik Svensson
1995-01-12 14:44 ` Norman H. Cohen
1995-01-13  1:51 ` David O'Brien
1995-01-13 12:38   ` Laurent Gasser
1995-01-13 20:53     ` John DiCamillo
     [not found]       ` <3f8fnf$c8p@gamma.ois.com>
1995-01-16 11:02         ` Matt Kennel
     [not found]         ` <milodD2IFpG.329@netcom.com>
1995-01-17 21:39           ` R. William Beckwith
     [not found]       ` <3fa11q$sdh@gnat.cs.nyu.edu>
1995-01-16 20:20         ` David Moore
1995-01-14  0:24     ` David O'Brien
1995-01-20  4:43     ` Samuel Mize
1995-01-21 20:28       ` David O'Brien
1995-01-22 21:12         ` Robert Dewar
1995-01-23 18:35         ` Norman H. Cohen
1995-01-23 19:18         ` John Cosby - The Coz
1995-01-24 14:11         ` Samuel Mize
1995-01-14 10:37   ` Keith Thompson
     [not found]     ` <3fcjgt$b0v@cronkite.seas.gwu.edu>
1995-01-16 18:47       ` Robert Dewar
     [not found]   ` <D2It0r.4rp@inmet.camb.inmet.com>
1995-01-17 14:11     ` Norman H. Cohen
     [not found] <3fdcoi$chn@miranda.gmrc.gecm.com>
1995-01-20  5:01 ` Samuel Mize
1995-01-20 22:07   ` Garlington KE
1995-01-24  5:02     ` R_Tim_Coslet
     [not found] <3fgphd$sc3@rational.rational.com>
1995-01-20  5:51 ` RonaldS60
1995-02-07 13:55   ` Robert C. Soong
  -- strict thread matches above, loose matches on Subject: below --
1995-01-20  9:33 R.A.L Williams
1995-01-20 10:20 R.A.L Williams
1995-01-20 13:22 ` Renaud HEBERT
1995-01-24  3:35   ` David Moore
1995-01-25  5:38     ` Robert Dewar
1995-01-28 16:35     ` Jules
1995-01-29  8:06       ` Matt Kennel
1995-01-30  5:31       ` Michael Feldman
1995-01-31 22:22         ` David O'Brien
1995-01-24 20:23   ` N. Mellor
1995-01-25  8:50     ` Robb Nebbe
1995-01-25 14:19     ` John Volan
1995-01-26  5:07     ` Samuel Mize
1995-01-26 18:51       ` Mark A Biggar
1995-01-21 15:18 ` Robert Dewar
1995-01-21 21:03 ` David O'Brien
1995-01-23  3:09   ` Jay Martin
1995-01-23 12:50     ` Andrew McConnell
1995-01-24  0:54     ` Matt Kennel
1995-01-25 17:03       ` Norman H. Cohen
1995-01-26  1:13         ` Dr. Richard Botting
1995-01-26 14:32         ` Anders Juul Munch
1995-01-24  0:17   ` Bob Kitzberger
1995-01-23 20:46 ` Robert Firth
1995-01-24 14:25   ` Samuel Mize
1995-01-25  7:27     ` David O'Brien
1995-01-25 12:14     ` Robert A Duff
1995-01-25  5:57   ` David O'Brien
     [not found]     ` <3g9rf0$71k@Starbase.NeoSoft.COM>
1995-01-28 21:08       ` David O'Brien
1995-01-31 18:07         ` Samuel Mize
1995-02-01 10:23         ` Samuel Mize
1995-01-30  0:24     ` Mark S. Hathaway
1995-01-31  3:30       ` Jay Martin
1995-02-01 13:25         ` Jesper Kaagaard
1995-01-23  8:49 R.A.L Williams
1995-01-25 23:18 ` Charles H. Sampson
1995-01-31  9:34 R.A.L Williams
1995-02-01 16:45 ` Charles H. Sampson
     [not found] <3gsr0e$oin@miranda.gmrc.gecm.com>
1995-02-07 16:58 ` Mark S. Hathaway
1995-02-08  7:39   ` Travis C. Porco
1995-02-08 16:07     ` Fred J. McCall
1995-02-08 21:30       ` Garlington KE
1995-02-10 13:49 R.A.L Williams
replies disabled

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