We know that the majority of code for the F-35 was likely written in C++. The software for the F-22 on the other hand, was largely written in Ada, a sane language that’s great for real-time systems that has an extremely low rate of failure. This quote from the site Hacker News (user PeCaN) regarding the use of C++ in real-time systems sums it all up:
“Writing fault-tolerant real-time C++ is like walking on a tightrope while gripping a gun with the safety off. You can do it, but it’s not particularly pleasant.”
Ada has been used extensively over the years in many fighter jet projects: BAE Systems Harrier, Panavia Tornado, BAE Systems Hawk and Lockheed-Martin F-16 and F-22. And the Typhoon Eurofighter. They are using GNAT Pro Ada to implement and maintain the code for this jet, because of its robust systems architecture. Not C++. If I had to choose a jet, I would take the Eurofighter over the F-35 any day. Not just because the software works,but because it may actually be more maintainable over the total lifespan of the aircraft.
Want to check out all the cool projects being done with Ada? Adacore.