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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,971aa11c293c3db1 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-07-23 12:25:36 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!netnews.com!xfer02.netnews.com!newsfeed2.earthlink.net!newsfeed.earthlink.net!news.mindspring.net!not-for-mail From: Lao Xiao Hai Newsgroups: comp.lang.ada Subject: Re: Ada The Best Language? Date: Mon, 23 Jul 2001 12:26:55 -0700 Organization: AdaWorks Software Engineering Message-ID: <3B5C7A7F.6BC1E9D9@ix.netcom.com> References: <5be89e2f.0107170838.c71ad61@posting.google.com> <5be89e2f.0107180235.726d46a8@posting.google.com> <3B55B01A.DAC06D79@icn.siemens.de> <5be89e2f.0107181248.73298c57@posting.google.com> Reply-To: richard@adaworks.com NNTP-Posting-Host: 9e.fc.cc.aa Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Server-Date: 23 Jul 2001 19:26:18 GMT X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en Xref: archiver1.google.com comp.lang.ada:10480 Date: 2001-07-23T19:26:18+00:00 List-Id: codesavvy wrote: > > > > How do _you_ write multitasking/multithreading applications in C++ ? > > With a lot (really a lot) of system calls ? Very, very portable ;-) However, there is no consistency checking of these system calls relative to the underlying program. Ada's tasking model is useful because it is integrated into the overall program and the compiler can do full type checking, procedure call conformance evalutation, enforce visibility rules (which are nearly absent in C++), and a host of other things that require a coherent model for development. In this regard, C++ falls far short of Ada. > Do you have a metric for measuring the increase in productivity that > this brings about? Anecdotal. I worked with a programmer who was constantly complaining about Ada. He wanted to use C++. After a couple of months he finally came to me with, "I think I am beginning to get it. With C and C++ I can compile anything I write and then spend a long time debugging it. With Ada, it takes me a long time to get my program to successfully compile, but when it does, there is less debugging to do." This is difficult to measure using the usual tools for software metrics. Most metric methods are not at a sufficient level of granularity to differentiate between the many steps in bringing a program into production. Most managers do not take the time to collect metrics at that level of detail. > I hope the compiler is consistent from OS to OS > for Ada. How often is portability from one system to the next > required so that all one has to do is recompile and everything will > work the same needed? Not very often, almost never IMO. Anecdote, again. On an Army Command and Control system, the team I was advising was developing an Ada system for a computer someone had purchased on promises of good performance from the computer salesperson. The team was unable to meet its perfomance objectives, largely because of the tasking implementation on the target platform. Someone suggested converting the whole thing over to C. This, of course, would not have helped, but in a panic people will grasp at any flimsy straw floating on the surface. Along came a salesperson for Harris Computing, offering to run the software on their Nighthawk. "Oh no," thought the project manager. "We have to convert the Ada code to compile on their machine? " During original design, the team had carefully packaged all the platform-dependent code at the lowest possible level of the design. All the vanilla-flavored Ada code ported perfectly. The low-level package, consisting of a few-hundred lines, was ported easily with the help of technicians from Harris. Performance objectives were met and the project came in on-time, within budget. Prologue. As successful as the Ada version was, another company later won the contract. I no longer have any association with this project, but as I am told, they hated Ada. No technical reasons. Simply the usual stupidity. My informant tells me they sought and got funding to convert the whole thing to their favorite language and it is still not working properly. > > And - some of the "big" features of C++ like exception handling were > > copied from Ada. > > So what? So, it was done badly. C++ exception handling is far more complex than necessary. I read a three-part article about C++ exception handling in C++ Report several years ago that was simply scary. The more deeply one examines C++ exception handling, the more one wants to avoid it, especially for safety-critical software. Richard Riehle AdaWorks Software Engineering richard@adaworks.com