comp.lang.ada
 help / color / mirror / Atom feed
From: cis.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!news.ecn
Subject: Re: Ada and C++: A request for comparison/contrast/relative benifits
Date: 7 Aug 93 22:42:17 GMT	[thread overview]
Message-ID: <241b49$b44@truffula.fp.trw.com> (raw)

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....

             reply	other threads:[~1993-08-07 22:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-08-07 22:42 cis.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!news.ecn [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-08-08  0:46 Ada and C++: A request for comparison/contrast/relative benifits Michael Feldman
1993-08-08 17:47 Bjarne Stroustrup
1993-08-08 21:55 agate!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!math.ohio-state.edu!d
1993-08-09  5:25 Robert Dewar
1993-08-09 13:45 agate!spool.mu.edu!darwin.sura.net!source.asset.com!theeke
1993-08-09 18:53 Peter Juhl
1993-08-09 22:06 Robert Dewar
1993-08-10  2:43 cis.ohio-state.edu!math.ohio-state.edu!darwin.sura.net!seas.gwu.edu!mfeld
1993-08-11  4:49 Robert Dewar
1993-08-13  8:56 H.K. Pang
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox