Live data from Hacker News

C++ creator rebuts White House warning

infoworld.com

31–40 of 141 posts

Re: C++ creator rebuts White House warning

#31
post #25
post #13

Earlier quoted context omitted.

Programmer education, tools, language standards and best practices are all vastly different than 50 years ago. That's like pointing at a Ford Edsel and then claiming that modern humans can't make good cars.

In 1958 35,000 people died on American roads. Last year, 43,000. So yeah, cars have gotten safer at about the rate that C++ has.

Just as what's damning to C++ is how its security track-record compares to other programming languages available today, it's how the US's current number of roadway deaths and serious injuries compares to other developed nations that is so embarrassing and depressing:

> [I]n the last 30 years, the US has not kept pace with tumbling traffic death rates in Europe, east Asia and Canada. In 2021, as the US hit a 16-year high for fatalities, Japan and Norway posted the lowest number of road deaths since the 1940s.

> The contrast is especially striking among so-called vulnerable road users, a category that includes walkers as well as those using bikes, scooters and wheelchairs. According to the OECD, pedestrian deaths in the US rose over 40% from 2010-18, more than twice the pace of any other member country (most of which saw a decline).

https://www.bloomberg.com/news/features/2022-11-03/why-us-tr...

Re: C++ creator rebuts White House warning

#32
post #8

Yeah. The language you pick doesn't magically make you Fort Knox regardless of "memory safety". Rewind in time and the White House would be berating all of us to write in Java... you know... a "memory safe" language, only for the worst security fail to come along Log4Shell.

Yeah the logging bug was bad. That’s one bad bug.

C++ has bugs that bad that are found and weaponized daily.

So, Java is much safer probably by 2-3 orders of magnitude.

Also - the log4j thing shows just how dangerous class loading is. It’s an eval like mechanism. Probably future languages designed with safety in mind should avoid eval-like mechanisms as well as avoiding type system escape hatches.

Re: C++ creator rebuts White House warning

#34
post #22

He seems to be in denial. I watched Stroustrup's CppCon 2023 talk about safety[0] a few months back. He spends about an hour talking about how important safety is and all the new things C++ offers to write safe code. Why did he suddenly start caring about safety now ? C++ is like a mad hatter's bad acid trip and somehow people are convinced it's still a great language to use in 2024. [0]: https://www.youtube.com/watc…

Is that the talk where Stroustrup avoids even saying the word Rust for the entire talk even though the talk is 100% a reaction to Rust?

On the other hand Herb Sutter recently wrote an interesting and grounded article on his views of Safety. While I don't agree 100% with him, at least he acknowledges the position C++ is in.

Edit: The article:

https://herbsutter.com/2024/03/11/safety-in-context/

Re: C++ creator rebuts White House warning

#35
post #13

> Of the billions of lines of C++, few completely follow modern guidelines, and peoples’ notions of which aspects of safety are important differ. I and the C++ standard committee are trying to deal with that If only people were perfect, then things would be perfect. There’s, what, 40 years of evidence to suggest that most people, most of the time, simply cannot write memory-safe C++ code (50 years if you count C.) Ma…

Programmer education, tools, language standards and best practices are all vastly different than 50 years ago. That's like pointing at a Ford Edsel and then claiming that modern humans can't make good cars.

An Edsel, 70 years later, still doesn't have seat belts, air bags, a crumple zone, and a crash-test rating.

Almost all modern cars are better.

Re: C++ creator rebuts White House warning

#37
post #22

He seems to be in denial. I watched Stroustrup's CppCon 2023 talk about safety[0] a few months back. He spends about an hour talking about how important safety is and all the new things C++ offers to write safe code. Why did he suddenly start caring about safety now ? C++ is like a mad hatter's bad acid trip and somehow people are convinced it's still a great language to use in 2024. [0]: https://www.youtube.com/watc…

He isn’t talking about memory safety and keeps avoiding it.

Re: C++ creator rebuts White House warning

#38

There's the language as idealized, and the language as used. Stroustrup is clearly brilliant, but he's talking about the former while everyone else means the latter. If you started a brand new C++ project today, using only the modern, safe ways of doing things and including only dependencies that do the same, OK, fine. That's, what, 0.1% of C++ projects? The rest of them use a soup of features and misfeatures that've…

> There's the language as idealized, and the language as used.

As an aside from safety, I'd like to whine about how the "modern" solution for organizing C++ code into modules was standardized ~4 years ago after however many years of development and still barely works in practice on any of the three major toolchains. What good is solving problems on paper if the solution is apparently near impossible to implement properly?

Re: C++ creator rebuts White House warning

#39
post #26

Earlier quoted context omitted.

I’m not pointing at a contemporary akin to Ford or Edsel. I’m pointing at people today using the latest versions of these tools today making the same class of mistake as someone might have made 4 or 5 decades ago. The tool is the problem.

Ironically, Margaret Hamilton _was_ able to produce a bug free program back in the 60s. However, no-one is seriously considering replicating her techniques because they (some of them, ant least) are way too expensive for modern software.

1) The Apollo Guidance Computer software was not bug-free[0]

2) The AGC software was not written in C++

The NASA approach to software development undoubtedly results in high quality assurance, but at a huge productivity cost that most commercials shops could not shoulder.

What do you do about the huge amount of software that needs to be developed that is too complex and cannot justify things like having 5 independent concurrent executions running two completely separate but functionally identical code bases tested by a completely independent adversarial test team?

I’d argue you could start by using tools that don’t allow, let alone encourage, your programmers to make common mistakes with catastrophic consequences.

0 — see, for instance, https://ibiblio.org/apollo/Documents/COM-1.pdf

Re: C++ creator rebuts White House warning

#40
post #25
post #13

Earlier quoted context omitted.

Programmer education, tools, language standards and best practices are all vastly different than 50 years ago. That's like pointing at a Ford Edsel and then claiming that modern humans can't make good cars.

In 1958 35,000 people died on American roads. Last year, 43,000. So yeah, cars have gotten safer at about the rate that C++ has.

The rate of deaths has dramatically declined. A lot more people are driving, and they're driving a lot more.
Post reply on HN