comp.lang.ada
 help / color / mirror / Atom feed
From: chuck@amdahl.amdahl.com (Charles Simmons)
Subject: Re: "C" vrs ADA
Date: Wed, 26-Aug-87 15:32:08 EDT	[thread overview]
Date: Wed Aug 26 15:32:08 1987
Message-ID: <12962@amdahl.amdahl.com> (raw)
In-Reply-To: 6338@brl-smoke.ARPA

In article <6338@brl-smoke.ARPA> gwyn@brl.arpa (Doug Gwyn (VLD/VMB) <gwyn>) writes:
>The language the code is written in is really a very small part of
>structured software methodology; one can apply the techniques in
>COBOL, PL/I, FORTRAN, Pascal, or C.  As a matter of fact, there are
>C environments for sale that are just about as "safe" as Ada; most
>typo and similar errors are caught by C compilation and "lint";
>unhandled exceptions in C typically produce an immediate core image
>for debugging, etc.  Very little difference, really.

Um...  How do these C environments detect subscript range errors
in a piece of code like:

        strcpy(s,t)
        char *s, *t;
        { while (*s++ = *t++); return s;}

Although an unhandled exception in C "typically" produces a dump,
it does not "always" produce a dump.  Also, the dump may occur long
after the invalid code was executed, making it more difficult to figure
out what went wrong.

Yes, lint does work quite well.  Unfortunately, I come from a PL1
background where the compiler generated type-checking information
and the linker made sure everything matched.  With lint, I have to
have to perform an extra pass through my code.  Admittedly, it's not
a whole lot of work, but if type-checking were integrated with the
compiler, things would move along a little faster...

>C's one really major problem from the structured viewpoint is
>that it has only two effective levels of name space, module
>internal and global.  This makes it necessary to strictly
>allocate global names, which is an annoying but solvable problem.

Tee hee...  And here I was beginning to think the name space rules
were one of the advantages of C.  Actually, arn't there three levels
of name space?  "static global" or a variable that can only be seen
from within a file, "procedure internal" or a variable that can only
be seen from within the surrounding procedure (or "begin end" block),
and "external global" or a variable that exists everywhere.

-- Chuck

  reply	other threads:[~1987-08-26 19:32 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1987-08-17 21:36 "C" vrs ADA Glen Harman
1987-08-18 14:49 ` spf
1987-08-19 17:03   ` "C" AND Ada Eugene Miya N.
1987-08-20  1:52     ` Richard Harter
1987-08-20 17:29       ` "C" AND Ada (epigram) David Palmer
1987-08-21  9:09       ` "C" AND Ada Kent Paul Dolan
1987-08-19 20:45   ` "C" vrs ADA ark
1987-08-20 20:10     ` Stephen 2. Williams
1987-08-21  0:19     ` Jef Poskanzer
1987-08-21  9:15     ` Webber
1987-08-21  1:04   ` R.A. Agnew
1987-08-21 15:27     ` spf
1987-08-23  0:35     ` Henry Spencer
1987-08-23 18:07       ` wyatt
1987-08-25 17:55         ` John Unekis
1987-08-25 18:57       ` David C. Albrecht
1987-08-27 16:32         ` Henry Spencer
1987-08-28 16:31           ` Renu Raman, Sun Microsystems
1987-08-28 15:51         ` Peter da Silva
1987-08-30  1:05           ` Rahul Dhesi
1987-08-31 13:55             ` sns
1987-09-04 16:51             ` VAX/VMS C Jim Sullivan
1987-08-18 15:17 ` "C" vrs ADA G.Gleason
1987-08-18 18:09 ` John Unekis
1987-08-21 12:07   ` Mr. Patrick J. Kelly Jr. GS-13
1987-08-21 13:00   ` steve
1987-08-21 14:04   ` Stefan M. Vorkoetter
1987-08-22 23:31     ` COBOL vs "C" vs ADA neubauer
1987-08-24 23:11       ` Dave Levenson
1987-08-25 19:18         ` FORTRAN vs COBOL vs Pascal vs C " Stephen the Greatest
1987-08-23 13:13     ` COBOL vrs Ada (was: Re: "C" vrs ADA) Kent Paul Dolan
1987-08-21 14:17   ` "C" vrs ADA M.P.Lindner
1987-08-21 15:10   ` Dave Haynie
1987-08-21 16:07   ` crowl
1987-08-22  2:44     ` hitchens
1987-08-27 18:53       ` jym
1987-08-22 14:31     ` Roy Smith
1987-08-26 16:17     ` Kurt Hoyt
1987-08-23  0:33   ` Henry Spencer
1987-08-18 18:43 ` Dave Haynie
1987-08-22 21:09   ` Eric Beser sys admin
1987-08-25 16:35     ` David Palmer
1987-08-26 14:21       ` spf
1987-08-28  0:49       ` peter
1987-09-03 20:03         ` R.A. Agnew
1987-08-26  3:38     ` Doug Gwyn 
1987-08-26 19:32       ` Charles Simmons [this message]
1987-08-26  9:25     ` Randell Jesup
1987-08-26 15:40     ` M.P.Lindner
1987-08-27 17:44       ` Jeff Bartlett
1987-08-31 17:53         ` mpl
1987-09-01 22:03           ` Barry Margolin
1987-09-02  0:32       ` eric
1987-08-26 18:30     ` Dave Haynie
1987-08-29  6:25     ` Henry Spencer
1987-09-01 19:02 ` Jacob Gore
1987-09-02 14:09 ` stt
  -- strict thread matches above, loose matches on Subject: below --
1987-08-25 20:44 blackje%sungod.tcpip
     [not found] <822@s.cc.purdue.edu>
1987-08-28 12:33 ` kelly
replies disabled

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