For those interested, the F-35 (née Joint Strike Fighter) C++ coding standards can be found here, all 142 pages of it:
As is common in hard real time code, there is no dynamic allocation during operation:
allocation/deallocation from/to the free store (heap)
shall not occur after initialization.
This works fine when the problem is roughly constant, as it was in, say, 2005. But what do things look like in modern AI-guided drones?I wonder if they use static analysis to enforce these rules, or if developers are expected to just know all of this
In general, are these good recommendations for building software for embedded or lower-spec devices? I don't know how to do preprocessor macros anyhow, for instance - so as i am reading this i am like "yeah, i agree..." until the no stdio.h!
The first time I came across this document, someone was using it as an example how the c++ you write for an Arduino Uno is still c++ despite missing so many features.
Interesting font choice for the code snippets. I wonder if that's been chosen on a whim or if there is a reason for not going with mono space.
[dead]
From quickly glancing over a couple of pages, that looks sensible. Which makes me curious to see some exceptions to the "shall" rules. With a project of this size, that should give some idea about the usefulness of such standards.