I think the main differences between C++ and Ada are:
-
Ada is strongly typed and C++ is weakly typed
- Ada has a much better packaging of the software then the
include files of the C pre-processor.
- Ada has a much better packaging of the software then the
-
Ada has much better typing:
a. arrays can have indexes that start with a number
other than zero and the upper and lower bounds are always checked.
There are no buffer over or under flows.
b. Enumerations can be used as indexes of arrays.
c. There several other features that are checked at
run-time to verify correct operation. -
Supports multi-threading in the language.
-
Strongly typed templates
-
Object copying by the assignment operator not a subroutine
call. -
The Ada language does not allow subsets or super-sets. SPARK
is a subset of Ada that improves the reliability of Ada. -
The Ada standard is available online for free,
. It is very readable
and smaller than the C++ and standard template library. There is
also a Rationale for the new features. The standards for the older
versions plus rationales (1983, 1995, 2005) are also available.
There are also test suites as well.
In summary, my defect rate is about 1.2 defects per 1,000 lines
of C/C++ and Java code over about 20,000 lines of code. With Ada,
it is about 0.3.It takes a little more thought to write an Ada program, but when
you get it to compile, it usually works. -