In a recent column, Jack Ganssle enthusiastically greets the arrival of Ada 2012 because it incorporates features and capabilities that he has been working hard to convince C and C++ embedded systems programmers to adopt explicitly and after the fact into their programming practices.
Even with the new capabilities incorporated into Ada 2012, there remain sceptics in the developer community who do not think Ada will be a factor in the mainstream of embedded programming. Part of that is due to the fact that Ada was developed in the early 1980s as a programming language for safety-critical military and aerospace applications.
But the nature of the embedded systems that software developers work on is changing as the devices they develop insert themselves into our daily lives in a way that the desktop computer never did.
They are in the power grid that serves our homes, in the meters that monitor our power useage, in virtually every electric appliance and entertainment device, in our light bulbs, in our phones, in our automobiles and in new intelligent medical monitoring devices – and many of them are connected to each other, to each of us and to the broader internet.
This new environment is certainly one in which something closer to the requirements for safety-critical design is needed. If not safety-critical, then dependable, absolutely dependable. In some environments, such as in the auto, and in the increasing number of medical monitoring devices we use, this need is an obvious no brainer. In others, the failure of the embedded design may be only an irritating inconvenience for the user. But if such failures happen often enough, those failures may be critical to the continued existence of the company that built them.
Also, many of the standards organisations that serve the needs of various industry segments – industrial, consumer, medical, transportation—are adopting software reliability and dependability requirements every bit as demanding as those in safety-critical military/aerospace applications.
But if you're still convinced that you do not need anything other than C or C++ in your in your embedded designs, consider the argument of Greg Gicca of Adacore in "Students need to learn multiple programming languages" – that learning about and using another programming language such as Ada might help you think better and write better C/C++ code. If it is true for computer science or electrical engineering majors in college, it is true for professional programmers as well.
"Understanding just a single language promotes solutions that only approach a problem from a single perspective," he writes. "Knowing multiple languages allows the problem to be looked at from a variety of perspectives so that multiple solutions can be compared and the most natural solution for the problem can be selected."
One good example of this ability to think about C-code development in a different way is " Seventeen steps to safer C code ," by Thomas Honold, who was faced with the challenge of writing a C-based project with safety and reliability demands that C could not satisfy. His earlier experience with Ada in a number of earlier military/aerospace projects made it possible for him to come up with a set of techniques and procedures for use with C to satisfy the requirements of the project.
The issue of the best programming language is a complex one. I would like to hear from you, in response to this article, or in blogs and articles for publication on the site and in the newsletters about your experiences and thoughts about programming in general, on Ada, on C or any other language with which you've had experience.
用户1406868 2013-3-31 05:07
用户3629500 2013-3-3 00:19
I have always been partial to Forth. It has advantages. It makes good programmers better. But it also makes bad programmers worse. You now know who to keep/advance and who to fire/reassign.