comp.lang.ada
 help / color / mirror / Atom feed
From: kst@alsys.com (Keith Thompson @pulsar)
Subject: Re: Ada ad in Embedded Systems Programming stinks
Date: Thu, 8 Sep 1994 06:47:13 GMT
Date: 1994-09-08T06:47:13+00:00	[thread overview]
Message-ID: <CvstIp.A0K@alsys.com> (raw)
In-Reply-To: JGOODSEN.94Sep7184648@trinidad.radsoft.com

In <JGOODSEN.94Sep7184648@trinidad.radsoft.com> jgoodsen@trinidad.radsoft.com (John Goodsen) writes:
> In article <1994Sep4.092729.21408@lmpsbbs.comm.mot.com> davidk@mcil.comm.mot.com (David Kramer) writes:
>    To add to Norman Cohen's list of reasons why an Ada compiler is more
>    effective than lint:
> 
>      It is much too easy to get around type mismatches in C - as any 
>      unscrupulous C programmer knows - all you have to do is use a cast!
[...]
> This isn't much easier than doing unchecked conversions in Ada.
> You identified a project management/process problem, not really a
> technological advantage of one language over another...

Any Ada program that uses an unchecked conversion must have an explicit
context clause for the generic function Unchecked_Conversion.  This makes
it very easy to tell that the program is doing something low-level and
potentially dangerous.  Furthermore, Ada clearly distinguishes between
unchecked and checked conversions.  C uses the same construct (the cast)
for arithmetic conversions from int to float that it uses to coerce one
pointer type to another.

Ada doesn't prevent you from writing ugly, low-level, non-portable code,
but it makes it more difficult to do it accidentally -- and that *is*
a technological advantage.

-- 
Keith Thompson (The_Other_Keith)  kst@alsys.com
TeleSoft^H^H^H^H^H^H^H^H Alsys, Inc.
10251 Vista Sorrento Parkway, Suite 300, San Diego, CA, USA, 92121-2718
/user/kst/.signature: I/O error (core dumped)



  reply	other threads:[~1994-09-08  6:47 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CvFI4J.D5M@world.std.com>
     [not found] ` <34ecqc$b5q@source.asset.com>
     [not found]   ` <34g5v3INN6q2@phage.cshl.org>
1994-09-06 13:46     ` Ada ad in Embedded Systems Programming stinks david.c.willett
     [not found]     ` <EACHUS.94Sep6094018@spectre.mitre.org>
1994-09-08  7:04       ` Dag Bruck
1994-09-08  9:52         ` Robert I. Eachus
1994-09-08 17:12           ` Dag Bruck
1994-09-08 17:28             ` Robert I. Eachus
1994-09-22  8:51         ` Brendan WALKER
1994-09-07 22:44   ` John Goodsen
1994-09-08  6:32     ` Keith Thompson @pulsar
     [not found] ` <1994Sep1.084046.21595@sei.cmu.edu>
     [not found]   ` <344u9q$di5@gnat.cs.nyu.edu>
     [not found]     ` <347idh$15ss@watnews1.watson.ibm.com>
     [not found]       ` <1994Sep4.092729.21408@lmpsbbs.comm.mot.com>
1994-09-07 22:46         ` John Goodsen
1994-09-08  6:47           ` Keith Thompson @pulsar [this message]
1994-09-08  8:52             ` David Emery
1994-09-11  3:41       ` Michael M. Bishop
1994-09-11 12:20         ` Robert Dewar
1994-09-11 13:29           ` Robert Dewar
1994-09-12 14:03             ` Norman H. Cohen
1994-09-11 21:48           ` Erik Naggum
1994-09-11 23:47             ` Robert Dewar
1994-09-12  6:28               ` Dag Bruck
1994-09-12 12:22                 ` David Weller
1994-09-12 20:03               ` Erik Naggum
1994-09-12 19:16             ` Maarten Landzaat
1994-09-13 10:10               ` Richard A. O'Keefe
1994-09-17 12:07                 ` Fred McCall
1994-09-12 20:49         ` Mitch Gart
1994-10-13 10:51 Bob Wells #402
replies disabled

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