J
Jerry Coffin
Dr. Adrian Wrigley wrote:
[ ... ]
Unfortunately, quotes like this tend to mean a lot less than they
initially look like they might. Considering the first item: what
constitutes "equivalent programs"? I've never in my life seen two
programs (at anything beyond the VERY most trivial level) that were
actually equivalent -- even when/if the same person/people attempt(s)
to reproduce an identical program, it's nearly inevitable that during a
rewrite at least a few things change, sometimes for the worse (second
system effect) and sometimes for the better (more experience,
refactoring, etc.)
Now, in fairness, I should add that in my own experience C++ programs
_have_ had higher long-term costs than (initally) roughly similar
programs I've written in other languages. That sounds bad, but in
reality it's exactly the opposite -- the reason the others had lower
long-term costs was that they were enough less maintainable that they
were discarded and replaced much sooner. Doing some looking through my
company database it looks like our C++ programs have cost just under
twice as much on average as their counterparts written in other
languages -- but their average useful lifetime has been better than
three times as long (so far -- most of the C++ programs are still in
regular use).
The real measure is not the long term cost of a particular program, but
the long-term cost of carrying out a particular task. Unfortunately,
that's generally much more difficult to measure, and (worse) attempts
at measuring it are much less common.
Looking at the second part, we get an even worse problem. I would
postulate that a typical programming project is basically a business
venture. Studies have shown for _years_ that the vast majority of
business ventures fail -- but most fail simply due to inadequate
startup capital, so they simply can't stay in business long enough to
become profitable.
Programming languages fit into this fairly nicely: when Ada is chosen,
it's mostly by a relatively large company with adequate funding that
hires experienced managers, has a clear goal and a reasonable idea of
how to reach it.
At the opposite end of the spectrum, if you look at an unfunded startup
consisting of one or two guys straight out of college who are certain
that in six months they're going to become billionaires by creating the
next Netscape, their language of choice is most likely Java, with C++
in second place, and Ada basically not even in the picture at all.
It takes only minimal business acumen to figure out which project is
more likely to succeed -- but even less to realize that IF each had
chosen the other language, the answer would be unaffected.
[ ... ]
one snippet from a Google search: [ ... ]
"C++ programs typically have roughly six times the lifetime ownership
costs of equivalent programs written in C, Ada or Fortran, and fewer
than one third of programming projects begun in C++ are completed."
Unfortunately, quotes like this tend to mean a lot less than they
initially look like they might. Considering the first item: what
constitutes "equivalent programs"? I've never in my life seen two
programs (at anything beyond the VERY most trivial level) that were
actually equivalent -- even when/if the same person/people attempt(s)
to reproduce an identical program, it's nearly inevitable that during a
rewrite at least a few things change, sometimes for the worse (second
system effect) and sometimes for the better (more experience,
refactoring, etc.)
Now, in fairness, I should add that in my own experience C++ programs
_have_ had higher long-term costs than (initally) roughly similar
programs I've written in other languages. That sounds bad, but in
reality it's exactly the opposite -- the reason the others had lower
long-term costs was that they were enough less maintainable that they
were discarded and replaced much sooner. Doing some looking through my
company database it looks like our C++ programs have cost just under
twice as much on average as their counterparts written in other
languages -- but their average useful lifetime has been better than
three times as long (so far -- most of the C++ programs are still in
regular use).
The real measure is not the long term cost of a particular program, but
the long-term cost of carrying out a particular task. Unfortunately,
that's generally much more difficult to measure, and (worse) attempts
at measuring it are much less common.
Looking at the second part, we get an even worse problem. I would
postulate that a typical programming project is basically a business
venture. Studies have shown for _years_ that the vast majority of
business ventures fail -- but most fail simply due to inadequate
startup capital, so they simply can't stay in business long enough to
become profitable.
Programming languages fit into this fairly nicely: when Ada is chosen,
it's mostly by a relatively large company with adequate funding that
hires experienced managers, has a clear goal and a reasonable idea of
how to reach it.
At the opposite end of the spectrum, if you look at an unfunded startup
consisting of one or two guys straight out of college who are certain
that in six months they're going to become billionaires by creating the
next Netscape, their language of choice is most likely Java, with C++
in second place, and Ada basically not even in the picture at all.
It takes only minimal business acumen to figure out which project is
more likely to succeed -- but even less to realize that IF each had
chosen the other language, the answer would be unaffected.