M
Martin Dowie
Ioannis said:With Ada aside (I find no reason why one should not learn it), C++ is a
powerful and systems programming language, and power implies painful low
level details. However it also provides all major high level facilities,
and if you stick in high level programming it is very safe, while it
maintains the maximum space and run-time efficiency principle.
It does NOT provide multi-tasking... or fixed-point numbers...
In general, we cannot compare the two languages because they have
different design ideals.
We we _can_ compare them... but you are correct that we must take their
design considerations into account. Ada95 was design specifically to
support efficient, real-time safe environments (the OP of the original
thread question), C++ was designed to produce an object-orientated
extension to C.
C++ supports 4 paradigms. Each paradigm is supported well with maximum
run-time/space *efficiency*. At the same time it leaves no room for a
lower level language except of assembly.
Ada83 suffered from some pretty poor implementations, but Ada95 has
never had the same problems. My own experience is that Ada95 compilers
produce as efficient code as any other language with the exception of
assembler. Not scientific I know but...
On the other hand I do not know ADAs ideals (for example I do not think
it supports the generic programming paradigm - templates), but I suspect
they are to be an easy (restricted to easy parts), safe (not letting you
do low level operations), application development language, which is OK
for usual application development.
Oh dear! That's a shocker!!!! Ada had generics back in Ada83 - and _all_
Ada83 compiler supported it then! The debugger support back then was
pretty shabby, but hey, at least the compilers all supported it and in a
completely uniform fashion.
Cheers
-- Martin