?
Solved

C++ Vs Ada

Posted on 1999-11-29
9
Medium Priority
?
387 Views
Last Modified: 2010-04-16
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.
0
Comment
Question by:ytgprasad
  • 3
  • 2
  • 2
  • +2
9 Comments
 

Author Comment

by:ytgprasad
ID: 2242783
Edited text of question.
0
 
LVL 22

Accepted Solution

by:
nietod earned 300 total points
ID: 2243676
The C++ standard is non-OS specific and non-hardware specific.  These sort of features are extremely OS and hardware specific.  For example, many OSs don't support multiple threads (DOS, CP/M, the original Mac OS to name a few), so if C++ contained features concerning threads, it could not made to work on these OSs.   That is why C++ contains no thread related features and no real-time related features.  (Most OSs have no support for real-time.  Even the windows OSs don't.)  Similarly, there is no support for real-time delays, becuase most hardware (or OSs) can't support it.  The resolution of timers can varry increadibly across platforms and many OSs still can't guarantee reliable access within a necessary time frame (in windows a thread could be suspended for several seconds before being scheduled.  That is a major limitation.)
0
 
LVL 2

Expert Comment

by:GleasonGuy
ID: 2243682
Do all the kids have take home tests now?

And since when is Ada popular?

0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 

Author Comment

by:ytgprasad
ID: 2243729
Edited text of question.
0
 
LVL 1

Expert Comment

by:Ernest022699
ID: 2244404
Ada is only "popular" with DOD types.  It is not used much by civilians.  (With good cause, I might add.)
0
 
LVL 22

Expert Comment

by:nietod
ID: 2244470
Does the DOD make toasters and microwaves these days?
0
 
LVL 1

Expert Comment

by:Ernest022699
ID: 2244486
Yup; they have for years.  Trouble is, scientific notation is needed to specify their price....
0
 
LVL 2

Expert Comment

by:mflam
ID: 2246192
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
0
 
LVL 22

Expert Comment

by:nietod
ID: 2246613
>> 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.
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

593 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question