c++ vs ada results

alan dare alan at hal.larc.nasa.gov
Thu Jun 13 02:47:41 AEST 1991



Netlanders,

	A short time ago I put a request out for information on c++ vs
Ada. I was hoping for several responses from people on both sides of the 
fence that were working on graphics applications. As my primary application
is graphics. What did I receive? I received more requests to post the results
than I received mail from people using c++ or Ada. I received only two
messages from people using c++ in a graphics application and none from
anyone using Ada. There were several messages from general users of c++
and only a few from Ada users. A kind soul FAX'ed me a document "A comparison
of Experiences with the Maintenance of Object-Oriented Systems: Ada vs. C++".
I didn't try to post a summary of the article (it's to big). The comments
below were sent to me. I don't claim any responsibility for them. I don't
currently use c++ or Ada. The comments are provided as a request from many 
people. Please don't use this posting to start a language war. 


The first post went to the following news groups:
	comp.sys.sgi
	comp.graphics
	alt.graphics
	comp.lang.ada
	comp.lang.c++

The comments below were edited only to reduce size, not content.


**************************************************
*** Graphics *************************************
**************************************************


o	I use C++ for graphics work. We considered ADA.
	Both have great pluses and a lot of minuses.
	Mostly the minuses are finding existing graphics packages 
	which are compatible. They are rare with C++ and non-existent 
	with ADA to my knowledge.

o	Ada has lots of features totally irrelevant to graphics 
	which cost something in compile time even on a compiler that
	produces efficient code.  It has no particular features to
	reccommend it for graphics particularly over any of the common 
	block-structured languages.



**************************************************
*** PRO ADA Comments *****************************
**************************************************

o	The Ada MIL-SPEC and validation suites do a
        lot to insure a consistent interpretation of the
        language across platforms and vendors.  No such
        validation or "frozen" specification exists for
        C++.  This causes lost time and less portability.

o       Ada's Packages and Generic Packages are a
        lot easier to design for than C++ classes.

o       Ada has better support for embedded systems'
        work than C++.  C++'s OO mechanisms
        (particurlarly dynamic binding) exact a performance
        penalty that will not be acceptable for some
        hard real-time systems.  This will be less
        important in the future, as hardware gets
        faster and applications get more complicated
        (thus requiring the complexity-management
        mechanisms offered by languages like C++).
        Ada 9X will probably suffer similar performance
        penalties on the same kinds of mechanisms.

**************************************************
*** CON ADA Comments *****************************
**************************************************

o	The language is too big for the few benefits over C++ that 
	it features.

o       Ada is a "weaker" language than C++ in expressing
        OO concepts (e.g. inheritance, polymorphism).
        Packages, Generic Packages and Ada's overloaded
        operators aren't enough.  Ada 9X will supposedly
        deal with these issues, but it will be at least a decade
        before the Ada 9X environment is truly widely
        available at a reasonable cost.

o	ADA compilers tend to cost real money.

o	ADA suffers from having way too many features -- probably 
	an artifact of the design-by-committee process.  It's such a
	huge language that a programmer may never fully "learn" it.

o	Converting code to ADA from anything is a problem.

o	ADA still tends to be slow, though that problem is slowly 
	going away.

o	Ada is only object-based (it has no inheritance), while 
	C++ _is_ object-oriented.


**************************************************
*** PRO C++ Comments *****************************
**************************************************

o       The dynamic binding, polymorphism and inheritance mechanisms 
	are *extremely* powerful, and very useful in graphical 
	applications.  Future enhancements including parameterized
        types (== Ada "Generic Packages") and exceptions 
	(== Ada exceptions) are going to be equally powerful.

o	After extensive reading and personal evaluation, I came to the 
	conclusion the ADA implementions are far worse than the C 
	implementations (I use the stuff from GNU, don't see how anyone 
	can write better software).

o	C++ compilers are cheap -- the GNU family is free, and runs 
	on a number of different architectures.  You can get the source 
	code so that you can fix it if it's broken.

o	C++ seems to be a reasonably clean design; the features tend to 
	be orthogonal and complete.  A competent programmer can probably 
	"learn" C++ pretty well in a month. 

o	Converting code from C to C++ isn't a big problem.  (And with 
	some of the Fortran-to-C translators that are publicly available,
	the Fortran->C->C++ path, while a bit of a pain, isn't 
	completely daunting.)

o	C++ runs just about as fast as C, i.e. it's plenty fast enough 
	to write things like volume renderers. 

**************************************************
*** CON C++ Comments *****************************
**************************************************

o	The tools for working with it maybe not as mature as ada tools.

o	C++ is hard to master.

o       C++ has reasonable OO mechanisms, but they
        are difficult to learn, and more difficult to use
        effectively.  This is partially due to the low
        quality of the documentation, which is quickly
        changing.





**************************************************
*** GENERAL Comments *****************************
**************************************************


o       There are a lot more Ada people out there, at
        the moment, than C++ people.  There will probably
        be a lot more C++ people in the future than Ada
        people, simply because the language is more
        accessable to more people (Gnu C++ is free, for
        example; "Turbo C++" costs ~$60; AT&T is
        very generous in licensing to Universities).


o       There will probably be a lot more C++ compilers
        available on a lot more platforms than Ada
        compilers in the future (the costs of validation
        are high; reuse of AT&T code  or GNU code
        is cheap).



I would like to thank the following for responding to my post :

baker at csl.dl.nec.com
blbates at aero36.larc.nasa
brendan at illyria.wpd.sgi.com
fmhv at inesc.inesc.pt
jansm at cih.hcuge.ch
jdt at voodoo.boeing.com
jls at netcom.com
jshumate at logdis1.wr.aflc.af.mil
leisner.henr801c at xerox.com
richard at elroy.Jpl.Nasa.Gov
rsk at gynko.circ.upenn.edu
uselton at nas.nasa.gov

-- 

*********************************************************************
Alan Dare                     |  Internet : alan at hal.larc.nasa.gov
NASA Langley Research Center  | 



More information about the Comp.sys.sgi mailing list