comp.lang.ada
 help / color / mirror / Atom feed
From: "Steve Doiel" <nospam_steved@pacifier.com>
Subject: Re: More questions...
Date: 1999/03/08
Date: 1999-03-08T00:00:00+00:00	[thread overview]
Message-ID: <36e4a5ff.0@news.pacifier.com> (raw)
In-Reply-To: 7bvb4j$lt0$1@remarQ.com


Michael Young wrote in message <7bvb4j$lt0$1@remarQ.com>...
>I have two questions about Ada; more will certainly follow.
>
>1) I've heard it said here that Ada, compared to other languages, is
>"reader-friendly" at the expense of being "writer-unfriendly". I
>understand the need to be reader friendly. I'm curious why you feel it
>is friendlier to read than, say, C++.
>

For an illustration, point your web browser to:
  http://www.lucent.com/ideas2/perspectives/bltj/
Select "Current"
Then select "A Software Fault Prevention Approach in Coding and Root Cause
Analysis".

This document is not a contrast of Ada and C, it is an analysis of defects
found in a sizable switching system that was implemented in C.  The document
gives a number specific examples of common coding errors found in the
system.

In my opinion none of these coding errors would be present if the code were
written in Ada.  These errors were the result of the tricky syntax in C.

It may be easier to read "good" C code than "bad" Ada code.  But with my
luck (and experience) I am more likely to have to read "bad" C code and
"average" Ada code.


>2) Robert Dewar stated some time ago that finalize should be used
>sparingly because of performance concerns. Is this still true of GNAT
>3.11? More broadly, is this a language issue, or a feature specific only
>to certain GNAT or other implementation? Destructors in C++ are simply
>normal function calls. Are controlled types significantly different from
>other types to make this unrealistic?
>


The use of finalization may add function calls to code that appears to
consist of simple assignments.  The same is true of C++.  While I don't know
how Ada and C++ compare when it comes to performance of Finalization versus
destructors, both cases add a lot of hidden action to othewise simple
looking code.

SteveD






  parent reply	other threads:[~1999-03-08  0:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-07  0:00 More questions Michael Young
1999-03-08  0:00 ` James S. Rogers
1999-03-08  0:00   ` Hyman Rosen
1999-03-10  0:00     ` Matthew Heaney
1999-03-08  0:00 ` Steve Doiel [this message]
1999-03-09  0:00 ` Samuel Mize
1999-03-09  0:00   ` Hyman Rosen
1999-03-10  0:00   ` robert_dewar
1999-03-09  0:00 ` Samuel Mize
replies disabled

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