(j3.2006) (SC22WG5.5758) RE: RE: Units of measure

Van Snyder van.snyder
Thu Jul 7 18:36:25 EDT 2016

On Thu, 2016-07-07 at 19:15 +0000, Bill Long wrote:
> As a follow-up, you have a oft-repeated story about converting one of
> the NASA codes to C++.  It would be straightforward to add units
> checking into C++.  Was that included in the requirements for the C++
> project?  

I don't know whether it was added.  I suspect not.  When the code was
used in parallel with the Fortran legacy code for the Phoenix Mars
lander, one of the navigators whispered to me "It doesn't work!"

It's apparent they don't care about labor cost,  They wanted to follow a
fad.  The legacy code had a maintenance staff of 6.5 work-years per
year.  They asked for 120 work years of funding in 1996.  I calculated
that if they reduced their maintenance cost to zero, they'd break even
in 2023.  About five years ago they came back to their sugar daddy and
said "It's almost done.  We have just a few loose ends to tie up.  We
only need another 126 work years of funding."  I think the maintenance
staff numbers about 20 now.  This is a bit better than Les Hatton's
measurements, which suggest the lifetime cost of a program implemented
in C++ is about six times the cost of an equivalent program in C,
Fortran 77, or Ada.

If it's straightforward to add units in C++, why is it insurmountably
difficult in Fortran?

More information about the J3 mailing list