Link to home
Start Free TrialLog in
Avatar of ytgprasad
ytgprasad

asked on

C++ Vs Ada

The following features of Ada 95 real-time control are not provided as part of C++:
    1) Portable multithreaded language features, with at least 30 real-time priority levels
    2) Thread-safe runtimes, including exception handling and destructors / finalization
    3) Uniform model for interrupt handling support and control
    4) Portable bit-level control of representation
    5) Delays based on both time-of-day and a real-time clock
    6) Compiler-provided routines for serializing data types as part of remote procedure calls or I/O, as well as ability for user to substitute their own.

my question is can you add some more to these and explanation why these are not provided as part of C++ and also more light on the above issues so that any body can understand that why is Ada more popular that C++ in real time systems.

FYI only: FMS (Flight Management System) is a software used in the aircrafts. This software is written entirely in ADA. This software controls the flight right from the take off to landing.
Avatar of ytgprasad
ytgprasad

ASKER

Edited text of question.
ASKER CERTIFIED SOLUTION
Avatar of nietod
nietod

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Do all the kids have take home tests now?

And since when is Ada popular?

Edited text of question.
Ada is only "popular" with DOD types.  It is not used much by civilians.  (With good cause, I might add.)
Does the DOD make toasters and microwaves these days?
Yup; they have for years.  Trouble is, scientific notation is needed to specify their price....
C++ is popular with RT applications:
Please see all the RT and DSP makers on market. Please look up the following company sites: I hope you heard of these companies:
Motorola, ADI (Analog Device), TI (Texas Instruments).
I don't know of a military or civilian RT company that does not use these parts and environment.

Of course the features you talked about are all there on the C++ compilers and platforms meant for it.
It's just there's much more to programming than RT. (Not to say that real-time is not an important issue,
it's just one market, among others).

C++ was developed on C, and was not a completely blank language. This must be realized.
AKA C as the most powerful language of the time, gave C++ it's power.
Almost EVERY platform has C++ running on it.

Interupt support is no good for operating systems, that want everything working through the API.
Please search "DirectX" and "DDK" in
http://msdn.microsoft.com

Bit level control is contra optimizatoins for specific OS.
See the "JIT" and "java" at
http://www.sun.com.

Clocks and RT clocks are supported via the OS API (on MS for instance: timeGetTime()) and via internet and special hw/sw from various vendors.
The language cannot promise anything.

Finally, it may be (and some believe it's not a joke) that crashing programs and operating systems sell better in certain markets (as long as it's not Boing). Please refer to a small company called: Microsoft.

Moshe
>> Of course the features you talked about are
>> all there on the C++ compilers
But not as part of standard C++, which is what the question asks about.  Those features are available only by using OS services or non-standard library functions.  Standard C++ does not provide anything remotely related to real-time control.

>> The language cannot promise anything.
C++ can't.  It was designed to be hardware and OS independant.  Many lanugages can make those promises, because they are not hardware/OS independant.