Live data from Hacker News

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

youtube.com

321–330 of 451 posts

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

#321
post #109

https://web.archive.org/web/20111219004314/http://journal.th... (referenced, at least tangentially, in the video) is a piece from the engineering lead which does a great job discussing Why C++. The short summary is "they couldn't find enough people to write Ada, and even if they could, they also couldn't find enough Ada middleware and toolchain." I actually think Ada would be an easier sell today than it was back the…

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++.

> If the DoD enforces the requirement for Ada, Universities, job training centers, and companies will follow

DoD did enforce a requirement for Ada but universities and others did not follow.

The JSF C++ guidelines were created for circumventing the DoD Ada mandate (as discussed in the video).

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

#322
post #317

Earlier quoted context omitted.

> 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 o…

But Ada had for a number of years a mandate to require its usage [0]. That should have been an extreme competitive advantage. And even then, C++ is still used these days for some US military projects, like F-35. Though I don't know whether the F-35 is successful or not, if it is not, that could be an argument against C++.

Ada is almost non-existent outside its niche.

The main companies arguing for Ada appear to be the ones selling Ada services, meaning they have a horse in the race.

I barely have any experience at all with Ada. My main impression is that it, like C++, is very old.

[0]: https://www.militaryaerospace.com/communications/article/167...

> The Defense Department`s chief of computers, Emmett Paige Jr., is recommending a rescission of the DOD`s mandate to use the Ada programming language for real-time, mission-critical weapons and information systems.

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

#323

Earlier quoted context omitted.

While there are several comparable European alternatives, many countries put their bets on the F-35 a long time ago. It is very much a part of this discussion. I’m from one of those countries, and I can assure you a lot of people would now have preferred that we went with an EU competitor instead.

What comparable alternative is available today? None of the European companies has a production 5th generation aircraft nor the integrated sensing capabilities. This is what is driving the incredible demand despite misgivings. You can't survive in a near peer combat environment without it. Countries are buying it because it is the only game in town for certain high-value capabilities, not because they necessarily lik…

I'm no expert, but the narrative is that it really depends what you need them for. And keep in mind that joining the jet fighter programme also means joining the development of it, enacting a certain amount of influence through your funding. For example, it is conceivable that a sufficiently upgraded Gripen tailored to our needs would be just as effective (which aren't really dogfighting, as I understand it), and cheaper.

Anyway we're all just crossing our fingers that the US is just temporarily insane and will eventually come to its senses. What else can you do.

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

#324

Earlier quoted context omitted.

Golang is exactly the same. It's extremely annoying until it's suddenly very useful and has prevented you doing something unintended.

I fail to see how a warning doesn't achieve the same thing while allowing you to iterate faster. Unless you're working with barbarians who commit code that complies with warnings to your repo and there is 0 discipline to stop them.

> I fail to see how a warning doesn't achieve the same thing while allowing you to iterate faster.

In almost every code base I have worked with where warnings weren't compile errors, there were hundreds of warnings. Therefore it just best to set all warnings as errors and force people to correct them.

> Unless you're working with barbarians who commit code that complies with warnings to your repo and there is 0 discipline to stop them.

I work with a colleague that doesn't compile/run the code before putting up a MR. I informed my manager who did nothing about it after he did it several times (this was after I personally told him he needed to do it and it was unacceptable).

This BTW this happens more often than you would expect. I have read PRs and had to reject them because I read the code and they wouldn't have worked, so I know the person had never actually run the code.

I am quite a tidy programmers, but it difficult for people even to write commit messages that aren't just "fixed bugs".

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

#325
post #233

Earlier quoted context omitted.

I fail to see how a warning doesn't achieve the same thing while allowing you to iterate faster. Unless you're working with barbarians who commit code that complies with warnings to your repo and there is 0 discipline to stop them.

You're not supposed to question the wisdom of the Go developers. They had a very good reason for making unused variables be an unconfigurable hard error, and they don't need to rigorously justify it.

Warnings are often ignored by developers unless you specifically force warnings to be compile errors (you can do this in most compiler). I work on TypeScript/C# code-bases and unless you force people to tidy up unused imports/using and variables, people will just leave them there.

This BTW can cause issues with dependency chains and cause odd compile issues as a result.

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

#326
post #273

Earlier quoted context omitted.

For many types of projects and approaches, avoiding UB is necessary but not at all sufficient. It's perfectly possible to have critical bugs that can cause loss of health or life or loss of millions of dollars, without any undefined behavior being involved. Funnily enough, Rust's pattern matching, an innovation among systems languages without GCs (a small space inhabited by languages like C, C++ and Ada), may matter…

Didn't PASCAL have variant record types with a kind of primitive pattern matching already?

Possibly, I am not sure, though Delphi, a successor language, doesn't seem to advertise itself as having pattern matching.

Maybe it is too primitive to be considered proper pattern matching, as pattern matching is known these days. Pattern matching has actually evolved quite a bit over the decades.

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

#327

The same is true for the software that runs many satellites. Use of the STL is prohibited. The main issue is mission assurance. Using the stack or the heap means your variables aren't always at the same memory address. This can be bad if a particular memory cell has failed. If every variable has a fixed address, and one of those addresses goes bad, a patch can be loaded to move that address and the mission can contin…

You can definitely have local variables on the stack. I don't know where you got that you don't use the stack. Heap is kind of a no-no, although memory pools are used.

> If every variable has a fixed address, and one of those addresses goes bad, a patch can be loaded to move that address and the mission can continue.

You can and do put the stack and heap pool at fixed memory ranges, so you can always do this. I'm not sold at all with this reasoning.

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

#329
post #288

Earlier quoted context omitted.

I agree. First of all I don't think Ada is a difficult language to learn. Hire C++ programmers and let them learn Ada. Secondly, when companies say "we can't hire enough X" what they really mean is "X are too expensive". They probably have some strict salary bands and nobody had the power to change them. In other words there are plenty of expensive good Ada and C++ programmers, but there are only cheap crap C++ progr…

Actually these kinds of projects are chronically over budget and the US military is notorious for wasting money. Using C++ vs wishing an Ada ecosystem into existence may have been one of the few successful cost saving measures. Keep in mind that these are not normal programmers. They need to have a security clearance and fulfill specific requirements.

They need to have very strict security clearance requirements and maintain them throughout the life of the project or their tenure. People don’t realize this isn’t some little embedded app you throw on an ESP32.

You’ll be interviewed, your family, your neighbors, your school teachers, your past bosses, your cousin once removed, your sheriff, your past lovers, and even your old childhood friends. Your life goes under a microscope.

Post reply on HN