From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,703c4f68db81387d X-Google-Thread: 109fba,703c4f68db81387d X-Google-Thread: 115aec,703c4f68db81387d X-Google-Thread: f43e6,703c4f68db81387d X-Google-Attributes: gid103376,gid109fba,gid115aec,gidf43e6,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!z14g2000cwz.googlegroups.com!not-for-mail From: "Jerry Coffin" Newsgroups: comp.lang.ada,comp.lang.c++,comp.realtime,comp.software-eng Subject: Re: Teaching new tricks to an old dog (C++ -->Ada) Date: 24 Mar 2005 22:28:22 -0800 Organization: http://groups.google.com Message-ID: <1111732101.995662.309040@z14g2000cwz.googlegroups.com> References: <4229bad9$0$1019$afc38c87@news.optusnet.com.au> <1110032222.447846.167060@g14g2000cwa.googlegroups.com> <871xau9nlh.fsf@insalien.org> <3SjWd.103128$Vf.3969241@news000.worldonline.dk> <87r7iu85lf.fsf@insalien.org> <1110052142.832650@athnrd02> <1110284070.410136.205090@o13g2000cwo.googlegroups.com> <395uqaF5rhu2mU1@individual.net> <1111607633.301232.62490@z14g2000cwz.googlegroups.com> <1111628011.160315.134740@o13g2000cwo.googlegroups.com> NNTP-Posting-Host: 68.64.130.76 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1111732106 27828 127.0.0.1 (25 Mar 2005 06:28:26 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 25 Mar 2005 06:28:26 +0000 (UTC) User-Agent: G2/0.2 Complaints-To: groups-abuse@google.com Injection-Info: z14g2000cwz.googlegroups.com; posting-host=68.64.130.76; posting-account=mZiOqwwAAAC5YZsJDHJLeReHGPXV5ENp Xref: g2news1.google.com comp.lang.ada:9968 comp.lang.c++:47184 comp.realtime:1711 comp.software-eng:5323 Date: 2005-03-24T22:28:22-08:00 List-Id: Dr. Adrian Wrigley wrote: [ ... ] > 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. -- Later, Jerry. The universe is a figment of its own imagination.