Live data from Hacker News

The C++ standard for the F-35 Fighter Jet [video]

youtube.com

311–320 of 451 posts

Re: The C++ standard for the F-35 Fighter Jet [video]

#311
post #223

Earlier quoted context omitted.

We've banned this account for continual guidelines breaches across multiple accounts.

You do realize that there's a handful of literally the same people here on HN continuously evangelizing one technology by constantly dissing on the other? Because of the pervasiveness of such accounts/comments it invites other people, myself included, to counter-argue because most of the time the reality they're trying to portray is misrepresented or many times simply wrong. This is harmful and obviously invites for…

We act on what we see, and we see what people make us aware of via flags and emails.

Comments like yours are difficult because they’re not actionable or able to be responded to in a way you’ll find satisfying if you don’t link to the comments that you mean.

Programming language flamewars have always been lame on HN and we have no problem taking action against perpetrators when we’re alerted to them.

Re: The C++ standard for the F-35 Fighter Jet [video]

#313
post #298
post #291

Earlier quoted context omitted.

But C-derived languages are also used much more. And it still shows that Ada does not automatically make software correct and robust. It presumably did indeed make Ada less popular than if it had not happened.

People still die in car crashes when wearing seatbelts, ergo seatbelts are useless.

Yet that was not any of my arguments. It, ironically, applies more to the argument you made in your previous post.

A better argument would have been based on statistics. But that might both be difficult to do, and statistics can also be very easy to manipulate and difficult to handle correctly.

I think companies should be free to choose any viable option, and then have requirements that the process and end product is good. Mandating Ada or other programming languages, doesn't seem like it would have prevented Ariane 5, and probably wouldn't improve safety, security or correctness, instead just open the door for limiting competition and cartels and false sense of security. I believe that one should never delegate responsibility to the programming language, more that programmers, organizations and companies are responsible for which languages they choose and how they use them (for instance using a formally verified subset). On the other hand, having standards and qualifications like ISO 26262 and ASIL-D, like what Ferrocene is trying to do with their products for Rust, is fine, I believe. Even though, specifically, some things about the Ferrocene-derived specification seem very off.

Re: The C++ standard for the F-35 Fighter Jet [video]

#314
post #259

Earlier quoted context omitted.

I've always strongly disliked this argument of not enough X programmers. If the DoD enforces the requirement for Ada, Universities, job training centers, and companies will follow. People can learn new languages. And the F35 and America's combat readiness would be in a better place today with Ada instead of C++.

Why require that companies use a specific programming language instead of requiring that the end product is good? > And the F35 and America's combat readiness would be in a better place today with Ada instead of C++. What is the evidence for this? Companies selling Ada products would almost certainly agree, since they have a horse in the race. Ada does not automatically lead to better, more robust, safer or fully cor…

> Why require that companies use a specific programming language instead of requiring that the end product is good?

I can think of two reasons. First, achieving the same level of correctness could be cheaper using a better language. And second, you have to assume that your testing is not 100% correct and complete either. I think starting from a better baseline can only be helpful.

That said, I have never used formal verification tools for C or C++. Maybe they make up for the deficiencies of the language.

Re: The C++ standard for the F-35 Fighter Jet [video]

#316

Earlier quoted context omitted.

Studies have looked at MISRA, I'm not aware of any for the JSF guidelines. For MISRA there's a mix, some of the rules seem to be effective (fewer defects in compliant software), some are the opposite (code which obeys these rules is more likely to have defects) and some were irrelevant. Notably this document is from 2005. So that's after C++ was standardized but before their second bite of that particular cherry and…

The "good" rules are like "don't write off the end of an array", and the bad ones are like "no early returns" or "variable names must not be longer than 6 characters". 95% of the "good" rules are basically just longer ways of saying "don't invoke undefined behavior".

> variable names must not be longer than 6 characters

My memory might be lapsing here, but I don't think MISRA has such a rule. C89/C90 states that _external_ identifiers only matter up to their first 6 characters [1], while MISRA specifies uniqueness up to the first 31 characters [2].

[1] https://stackoverflow.com/questions/38035628/c-why-did-ansi-...

[2] https://stackoverflow.com/questions/19905944/why-must-the-fi...

Re: The C++ standard for the F-35 Fighter Jet [video]

#317
post #301

Earlier quoted context omitted.

Ada and especially Spark makes it a whole lot easier to produce correct software. That doesn't mean it automatically leads to better software. The programming language is just a small piece of the puzzle. But an important one.

> Ada and especially Spark makes it a whole lot easier to produce correct software. Relative to what? There are formal verification tools for other languages. I have heard Ada/SPARK is good, but I do not know the veracity of that. And Ada companies promoting Ada have horses in the race. And Ada didn't prevent the Ada code in Ariane 5 from being a disaster. > The programming language is just a small piece of the puzzl…

>What is the proof for that, especially considering events like Ariane 5?

Ariane 5 is a nice anti-ada catchphrase, but ada is probably the most used language for war machines in the United States.

now the argument can be whether or not the US military is superior to X; but the fact that the largest military in the world is filled to the brim with warmachines running ada code is testament itself to the effectiveness of the language/dod/grant structure around the language.

would it be better off in c++? I don't know about that one way or the other , but it's silly pretend ada isn't successful.

Re: The C++ standard for the F-35 Fighter Jet [video]

#318

Earlier quoted context omitted.

your programs have a data segment. its not the heap nor the stack... and it can be (depending on loader/linker) a source of reliable object->address mappings as its not dynamically populated.

That sounds like your answer is: "Yes, global variables". That may be a perfectly good solution in many embedded environments, but in most other context's global variables are considered bad design or very limiting and impractical.

[deleted]

Re: The C++ standard for the F-35 Fighter Jet [video]

#319
post #259

Earlier quoted context omitted.

Why require that companies use a specific programming language instead of requiring that the end product is good? > And the F35 and America's combat readiness would be in a better place today with Ada instead of C++. What is the evidence for this? Companies selling Ada products would almost certainly agree, since they have a horse in the race. Ada does not automatically lead to better, more robust, safer or fully cor…

> Why require that companies use a specific programming language instead of requiring that the end product is good? I can think of two reasons. First, achieving the same level of correctness could be cheaper using a better language. And second, you have to assume that your testing is not 100% correct and complete either. I think starting from a better baseline can only be helpful. That said, I have never used formal…

How do you define a better programming language, how do you judge whether one programming language is better than another, and how do you prevent corruption and cartels from taking over?

If Ada was "better" than C++, why did Ada not perform much better than C++, both in regards to safety and correctness (Ariane 5), and commercially regarding its niche and also generally? Lots of companies out there could have gotten a great competitive edge with a "better" programming language. Why did the free market not pick Ada?

You could then argue that C++ had free compilers, but that should have been counter-weighed somewhat by the Ada mandate. Why did businesses not pick up Ada?

Rust is much more popular than Ada, at least outside Ada's niche. Some of that is organic, for instance arguably due to Rust's nice pattern matching and modules and crates. And some of that is inorganic, like how Rust evangelists through force, threats[0], harassment[1] and organized and paid media spam force Rust.

I also tried Ada some time ago, trying to write a tiny example, and it seemed worse than C++ in some regards. Though I only spent a few hours or so on it.

[0]: https://github.com/microsoft/typescript-go/discussions/411#d...

[1]: https://lkml.org/lkml/2025/2/6/1292

> Technical patches and discussions matter. Social media brigading - no than\k you.

> Linus

https://archive.md/uLiWX

https://archive.md/rESxe

Re: The C++ standard for the F-35 Fighter Jet [video]

#320
post #212
post #204

Earlier quoted context omitted.

C++ keeps getting bigger and bigger :D Thanks for sharing

This is actually C and C++ has not done something similar AFAIK.

C++23 does have std::unreachable (as a function), and its counterpart [[assume(expr)]]
Post reply on HN