Hacker News
points by arein3 4 days ago | 0 comments
Its a set of rules, used by defense software, they are available on the internet
[–] weitendorf 4 days ago
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

[–] fpoling 4 days ago
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.
[–] NSUserDefaults 4 days ago
For example the failed F-35 project used it. Seems pretentious and risky compared to using a language that is safe by default.
[–] Cthulhu_ 4 days ago
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)

[–] LiamPowell 4 days ago
The incredibly obvious answer is Ada, given the DoD commissioned it and the fact that it was used for the F-22.
[–] fpoling 4 days ago
I wonder if DoD desire to tap into a bigger pool of C++ programmers also brought a lot of people who was not trained to write a high-reliability code.
[–] tialaramex 4 days ago
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!

[–] pjmlp 4 days ago
He always misses the amount of avionics bugs that the F-35 suffered from, in spite of the rules.
[–] SolarNet 4 days ago
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).

[–] cestith 4 days ago
One of my current coworkers used to work on on-board systems for military aircraft. Anecdotally he tells me the critical systems for the ones he worked on were Ada but other systems could be C++.
[–] amelius 4 days ago
> compared to a language that is safe by default.

This also sounds pretentious ...

[–] NSUserDefaults 4 days ago
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.
[–] fps-hero 4 days ago
I don’t want to be inflammatory, so let’s stick to facts. The F35 is the manifestation of a test aircraft designed in the 90s. Of that era, software was predominantly single threaded, hardware definitely so. They also weren’t using the latest and greatest of hardware at the time, they opted for proven flight platforms with hardware dating back well back into the decade. So, very lacklustre performance, tight memory constraints.

The only other legitimate choice for writing software at the time would have been ADA, which for some reason never took off despite being purpose build for the application. Of that time, C++ was the new hotness, it was popular, it was solving architectural problems, and it was performant, unlike say Java.

It’s fairly naive to say “I’d never use C++”. The C++ programmers of the time would have looked at Fortran or COBOL with the same level of disdain. We are lucky to live in a time of better options, and the impending post code future.

[–] tialaramex 4 days ago
> The only other legitimate choice for writing software at the time would have been ADA

Ada makes a lot more sense for this work than C++ did twenty years ago.

[–] bluGill 4 days ago
Ada didn't make sense either: nobody wanted to learn it.
[–] pjmlp 4 days ago
Yes we did, the major impediment was the price of available compilers, their dependency on UNIX workstations, where the Ada compiler was extra, on top of C and C++ that were already there.

Until Ada Core offered GNAT to the community, there were no affordable compilers.

Yet, there is still enough business to keep 6 compiler vendors selling them.

[–] SolarNet 4 days ago
There were schools of computer science, accredited universities, that taught it heavily (one of the 3 lab intro to programming languages next to c++ and python, and allowed to be used through the entire program at mine). A 1/3 of graduates of some of these places got jobs in it, because they were reliable and well paying jobs.

And then the industry swapped to C++. This was not a DoD mandate, this was companies like boeing trying to pay their engineers 1/3 to 1/2 less by paying for C++ devs (starting salary for ada devs was 90-140k, starting salary for c++ devs was 60-180k according to exit statistics). They of course eventually learned that good C++ devs are actually more expensive than their old Ada ones. Not that they bothered to hire good c++ devs.

[–] Maxatar 3 days ago
No it wasn't that nobody wanted to learn it, it's that back then Ada developers cost a lot more than C++ developers and businesses didn't want to pay them.
[–] NSUserDefaults 4 days ago
“Let’s use the new hotness for this new fighter plane” maybe puts things into perspective for me.

In today's terms, that's like vibecoding a Mars mission vehicle just because it's "cool".

[–] drysine 4 days ago
>it [C++] was solving architectural problems

What do you mean?

[–] fps-hero 2 days ago
Think about the difference in how you would structure a program if it was coded in C++/Java vs C. C++ was an enabler of object oriented programming.
[–] drysine 1 day ago
About the same, I think)
[–] AnimalMuppet 4 days ago
In what sense was the F-35 project a failure?
[–] pjmlp 4 days ago
Total cost due to avionics issues and other construction failures.
[–] rerdavies 3 days ago
And failure to meet project requirements.

e.g. https://responsiblestatecraft.org/f-35-failure/

[–] throwaway2037 2 days ago
Has there ever been a modern fighter jet built in the last 50 years that wasn't consider in one aspect or another an "failure"? At this point, the term "failure" seems almost pointless to describe very large, nation state projects that are heavily used and have thousands built.
[–] fps-hero 1 day ago
Whether the F35 was a failure depends on whether you are looking out your forward window, or rear view mirror, and when you were looking.

The F35 program certainly seemed like a white elephant, until it crossed the threshold into production and wasn’t. It was a massively delayed cost blowout project, which has turned into a huge success.

[–] AdamN 4 days ago
Username checks out :-)