← Back to context

Comment by arein3

24 days ago

Its a set of rules, used by defense software, they are available on the internet

I think you're thinking of https://en.wikipedia.org/wiki/High_Integrity_C%2B%2B

I wrote a comment explaining what in my mind distinguishes "high reliability" (defensive programming and making invariants/error cases/intended use explicit) C++ from regular C++. IMO it basically boils down to contemporary "Google/fintech style C++", which is a different development culture and ecosystem from defense/automotive

  • The biggest split is not using exceptions with aborts on memory overflow. It alters the programming style to such extent that it feels like a different language.

For example the failed F-35 project used it. Seems pretentious and risky compared to using a language that is safe by default.

  • What language do you propose?

    (I'll just pre-empt that if you say "Rust", Rust wasn't around until recently and the F-35 project started in '93. These things span decades, while only a few programming languages do)

    • C++ is a pre-standard "Eh, just do whatever" language in 1993.

      Bjarne's 2005 JSF rules have the same effect as an "Employees must wash hands" sign. It's not the billion dollar fast food chain's fault that a minimum wage employee didn't obey the sign and now you've got food-borne illness. They put a sign up!

      1 reply →

    • Ada is far safer than Rust (not in edge case memory allocation problems, but in day to day application programming), and not only existed at the time, it was the industry standard for aviation (for good reason). Entire educational programs and pipelines existed for it.

      Boeing and other defense contractors dropped it because C++ programmers were cheaper on paper (not realizing/caring that good C++ engineers were more expensive).

      1 reply →

  • > compared to a language that is safe by default.

    This also sounds pretentious ...

    • Because you think there is no such language, or even one that gets closer than C++? Look I still kind of like C++… for games. I would never put it in a fighter jet for gods sake.

      12 replies →