In the midst of a fairly long diatribe, Sam Kumar wrote:
> good 'Gotcha!'. I should have said that programming languages
> based on the Dykstra/Wirth bandwagon haven't proven to be any
> safer than good Fortran 77.
Les Hatton ([log in to unmask]) has studied an enormous pile of
codes in C++, C, Fortran 77 and Ada 83.
He's observed that densities of defects detectable by static analysis
are all over the map, but for C, Fortran 77 and Ada 83 they appear,
statisticlly, to be drawn from the same population. Defect densities
averaged 5-10 per 1000 lines of code, but were over 100 in a few
isolated cases -- the most frightening being a Japanese nuclear
reactor control code written in Fortran 77.
Defect densities observed in C++ programs appear, statistically, to
come from a population with larger mean.
Given this, it was quite frightening to learn that there is apparently
a project to re-write the high-defect Japanese nuclear reactor control
program in C++.
Lifetime costs of equivalent programs in C, Fortran 77 and Ada 83
appear, statistically, all to be drawn from the same population.
Lifetime costs of C++ programs equivalent to programs developed in
C, Fortran 77 or Ada 83 appear, statistically, to be drawn from a
population with a mean about 3 times as large as the mean of the
population from which comparable C, Fortran 77 and Ada 83 programs
were drawn.
Measured by critera of safety, correctness, or lifetime cost, it's a
mystery why anybody uses C++.
Best regards,
Van Snyder
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|