Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Are those bugs because of C++, or because of bad programing skills and practices? No programming language can save you from bugs if you hire people who don't know what they're doing. I used to work in automotive when a lot of the critical safety SW was only assembly and the end product didn't have any critical bugs.

Maybe Lockheed just has shitty programmers who don't know what they're doing because the US defense industry is incompetent and the US SW jobs market top heavy where talent who does know how to use C++ right goes to big-tech and not on-site at some defense contractor? To me that's not the fault of C++.



Not all programming languages are equal when it comes to the skill needed to deliver correct software. Since a large project necessarily can expect only to bring merely ordinary skill to the problem if that's not enough they're in trouble, even if superlative skill would have succeeded that's not what they have.

C++ iterators are a big example of this problem. In the most skilled hands these are a very powerful technology, excellent performance yet tremendous flexibility - but they have a lot of footguns. So do you choose to accept the high defect rates when your ordinary programmers shoot themselves in the foot, or do you neuter this powerful technique to reduce those defects but suffer significant performance problems ?


>C++ iterators are a big example of this problem. [...] but they have a lot of footguns.

Bigger than coding in assembly?

>when your ordinary programmers shoot themselves in the foot

Then don't hire non-name foot shooting programmers off the street. Hire versed engineers with background in programing for safety critical systems, then have them train the code monkey engineers on the right way to think and work. Like I said, skill issue, not language issue.


The C++ job market is full of two kinds of developers.

Mediocre talent that struggles with the language and continually make use after free bugs.

And elitist arrogant developers in love with the language, skilled in its use, who continually make use after free bugs.


And you think enthusiasts of niche languages like Ada, will be more skilled and less elitist than C++ devs?


I think I'm tired, after 20+ years of being around the language, of hearing C++ developers tell people "they're holding it wrong" every time something blows up. Blaming the victim.

C++ is a language seemingly designed with footguns built in on purpose. Even worse it has a community full of elitism and obscurantism.

Rust isn't perfect (I have my gripes), but it has the right idea with ownership management at the static type system level. Ada has its own positives around explicitness and bounds checking etc

C++ for new projects in safety critical sectors makes zero sense to me.


> Even worse it has a community full of elitism and obscurantism.

I've never experienced that per se, I have experienced it in other fields or orgs where the bar to entry is super high. And keeping the bar to entry is often the goal of those that are elitist. Google interviews were that way 15 years ago.

I think the issue I keep coming back to with type safety is how do you make sure a value in meters is not mistakenly used as feet without some kind of translation. If you're going to have type safety, I feel the language should prevent that.

And if it can't prevent that, then it's not really "typesafe".


> I think the issue I keep coming back to with type safety is how do you make sure a value in meters is not mistakenly used as feet without some kind of translation.

Nominal typing - you declare meter and float to be separate types. Ada makes that simple. Both Rust and Ada support that, and it's normal practice in Ada to declare separate types for every unit.


>Even worse it has a community full of elitism and obscurantism.

Sorry but I' can't entertain such broad generalizations of people. That's like hearing a woman saying all men are trash.

I agree with comments on the technicality of the language but if you start attacking people, I'm out.


C with underfined behaviours it's far worse than a proved embedded Forth. At least you will know how it will behave with the stack/dictionary and so on.


Then why did the auto and aerospace industry standardize on C/C++ instead of Forth?

Just because something is sometimes better doesn't mean it's also more economical in production. You're still limited by budget constrains. With that budget you need to hire and/or train SW developer. It doesn't matter that X language might be better if you can't find and/or train people with experience on it. So you're better off using C with safety.


IDK about Airbus, but just have a look at Boeing.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: