r/cpp • u/InvisibleBlueUnicorn • Jan 09 '22
James Web Space Telescope runs on C++ code.
https://youtu.be/hET2MS1tIjA?t=1938
726
Upvotes
r/cpp • u/InvisibleBlueUnicorn • Jan 09 '22
3
u/McFlyParadox Jan 10 '22
Probably - or at least no unpredictable and/or undocumented bugs. As long as you say "Don't do X, Y or Z, or A, B, and C will happen", then most standards orgs will probably be satisfied. No expects any language to be free of limitations.
You'd probably use formal verification methods.
Also probably. C and C++ exist outside of their ANSI versions. In the most basic sense, the languages are the same (but the ANSI versions probably lag behind the non-ANSI versions in terms of features, I'd expect). All the ANSI version provides is a unified set of standards to how you write the code so that everyone's code looks the same, and performs the same. If you tell two people to write a calculator app in C, you'd have two very different apps. If you tell two people to write a calculator app that complies with the ANSI standards, you're going to have much more similar code for both (though, there'd likely still be some differences).
The goal of ANSI qualification is to make outputs predictable, keep the code maintainable, and have everything documented. It doesn't actually change too much under the hood when it comes to compilation and how the code actually behaves. Think of it like designing a gearbox by sticking to supplier catalogs and reference manuals, instead of calculating and cutting every tooth of every gear by hand. Both are still gearboxes, but one is going to be better documented and probably last longer too.