From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=0.8 required=3.0 tests=BAYES_50 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 7 Aug 93 22:42:17 GMT From: cis.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!news.ecn .bgu.edu!wupost!usc!venice!gumby.dsd.trw.com!truffula.fp.trw.com!trwacs!erwin@u cbvax.Berkeley.EDU (Harry Erwin) Subject: Re: Ada and C++: A request for comparison/contrast/relative benifits Message-ID: <241b49$b44@truffula.fp.trw.com> List-Id: The query is for a comparison/contrast/relative benefits assessment of C++ and Ada. I'll introduce C as a third comparison point. 1. Development cost: If C development costs "1" and assembly language costs "3", the costs for both C++ and Ada (in my experience) run between 1 and 3. The reason C++ costs so much is that I'm a simulation programmer, and I find myself getting into the arcane details of allocators, iterators, etc. Ada costs more than C because it takes more work to write the same code (about 2x). Of course, the maintenance costs of Ada are much less... 2. Performance. A C SLOC converts into about 5 machine language instructions. C++ is about the same...except for allocators, copy operators, destruction operators, etc., which tend to be invisible to the programmer, but not to the performance engineer. Ada SLOCs convert to about 10 machine language instructions (2xC), but you don't get into the arcane object creation/copying/destrution stuff. Experience suggests C++ code can be very crufty if the programmer doesn't keep this arcane lore in mind. 3. Functionality/Power. C and Ada are similar. C++ introduces object-oriented programming, complete with run-time resolution of linkages. The only kitchen sink missing from C++ is call by name (in Simula and Smalltalk, you can make a function call and have the parameters copied in at evaluation time (repetitively if necessary)). This reduces the power of the language, but not a lot. I guess in conclusion, Ada costs more and is easier to maintain. C++ has more power, but is harder to code and maintain, and has arcane features. C costs less, has less features, costs more to maintain, but is easier to use in real-time applications. Cheers, -- Harry Erwin Internet: erwin@trwacs.fp.trw.com Working on Freeman nets....