"Ed Falis" <fa***@verizon. net> wrote in message
news:opsnfw9nx7 5afhvo@localhos t...
On Thu, 10 Mar 2005 15:55:17 -0500, xpyttl <xp***********@ earthling.net>
wrote:
The two camps are equally close to the truth.
Fortunately, it mostly hasn't been that bad as language debates go ;-)
- Ed
I have been following this thread with great interest. C++ is by far my
favorite language, but use Ada almost exclusively at work. I love C++, but
I would not relish creating a large-scale, fault-tolerant system in it,
especially involving a large team with varying levels of skill. This thread
has been surprisingly civil with only one or two individuals using childish
attacks and half-truth to argue their side (I won't say which). Though, I
had to cringe when some in the C++ camp attempted to argue its safety vs.
Ada. I would not, myself, attempt that argument. I think its a great
language, and gives you a lot of flexibility that you can build safety upon,
but does not inherently come that way. On the other hand, it takes effort
to write an Ada program that will crash. If it compiles, it will usually
run. It may not do what you intended, of course, but it won't "core dump"
or cause a reboot, etc. Although I have to admit, I prefer C++'s OO model.
I find it easier (personally) to see the encapsulation, and Ada's
dispatching rules still confuse my. Can someone explain why they chose the
package as the encapsulation level for a class?
Ada features I would love to have in C++:
* "new types" and sub-ranges
* runtime template instantiation (I think being able to instantiate generics
dynamically is the coolest thing!)
* subprograms inside subprograms. I think it would be great for use with
the STL (i.e., using a local function with std::foreach)
* packages. namespaces are nice, but packages make modularity of very large
system a lot easier. Especially now with "use type"
* representation specifications! !!!
C++ features I would to have in Ada:
* Implicit instantiation. Yeah, I know, it can be unsafe, but that is one
thing I really like about C++: the ability to automate repetitive things.
* actually having a class object encapulating the data and methods.
* reference (in out) types in functions (without resorting to access types)
* meta-templates. very neat stuff. ugly, but neat.
* The STL!!! (though I hear something similar is coming?)