Live data from Hacker News

C++ creator rebuts White House warning

infoworld.com

21–30 of 65 posts

Re: C++ creator rebuts White House warning

#21
post #9

I agree; you can write perfectly safe and noncompromisingly performant code in C++ much better than any language today. It's genuinely difficult to understand why Rust gets rammed down everyone's throats lately; do they really think developers coming out of universities today are too stupid to grasp memory management? If that's the case, why not have everyone code in Scratch? That memo reads like "to avoid wet pants,…

Safe modern c++ is poorly understood compared to the decades of experience and knowledge corpus around old practices. The unsafe ways are still easily accessible and widely used, taught, and understood. C++ also is laden with complexity and idiomatic styles, immense foot cannons, etc.

Rust is fairly explicit with what’s unsafe (ie unsafe) and safety is default. It’s also generally a simpler language overall with less accretion of backwards compatibility. There aren’t decades of bad habits still usable in rust. It’s got modern sugar, first class functional constructs, and it’s generally cooler in the way metal was cooler than big band was in 1988.

Re: C++ creator rebuts White House warning

#22
post #15
post #8

About a year ago, Stroustrup wrote a similar response[0] to a similar statement from the NSA[1]. I wasn't really convinced and am more in agreement with this response to Stroustrup[2] from an embedded Linux developer. To quote from near the end of their response to Stroustrup: > In the meantime, it is unfair for Dr. Stroustrup to call safe programming languages novelties or to pretend that C++ isn’t already far behin…

C and C++ are HARD to use correctly, but how many of those 60-70% vulnerabilities would have been resolved by just compiling with llvm address sanitizer? It would have stopped virtually all of them? https://llvm.org/pubs/2006-05-24-SAFECode-BoundsCheck.pdf https://clang.llvm.org/docs/AddressSanitizer.html In many cases we already have the tools. The problem is that people are not using them. That said it is still in…

asan only catches what your test suite covers. specifically, that doesn't include novel attacks.

Re: C++ creator rebuts White House warning

#23
post #9

I agree; you can write perfectly safe and noncompromisingly performant code in C++ much better than any language today. It's genuinely difficult to understand why Rust gets rammed down everyone's throats lately; do they really think developers coming out of universities today are too stupid to grasp memory management? If that's the case, why not have everyone code in Scratch? That memo reads like "to avoid wet pants,…

name one piece of open source software in C or C++ with more than a couple thousand commits that has not had to fix a memory safety bug.

Re: C++ creator rebuts White House warning

#24
post #9

I agree; you can write perfectly safe and noncompromisingly performant code in C++ much better than any language today. It's genuinely difficult to understand why Rust gets rammed down everyone's throats lately; do they really think developers coming out of universities today are too stupid to grasp memory management? If that's the case, why not have everyone code in Scratch? That memo reads like "to avoid wet pants,…

Safe modern c++ is poorly understood compared to the decades of experience and knowledge corpus around old practices. The unsafe ways are still easily accessible and widely used, taught, and understood. C++ also is laden with complexity and idiomatic styles, immense foot cannons, etc. Rust is fairly explicit with what’s unsafe (ie unsafe) and safety is default. It’s also generally a simpler language overall with less…

Scratch is simpler than Rust and a lot safer. That's absurd, but maybe that's where we're headed?

Re: C++ creator rebuts White House warning

#25
post #14
post #9

I agree; you can write perfectly safe and noncompromisingly performant code in C++ much better than any language today. It's genuinely difficult to understand why Rust gets rammed down everyone's throats lately; do they really think developers coming out of universities today are too stupid to grasp memory management? If that's the case, why not have everyone code in Scratch? That memo reads like "to avoid wet pants,…

We've been trying the "just don't write bugs" strategy for over 40 years now, and it's not working. Framing this as a problem with people being too stupid is a completely unproductive mix of hubris and elitism. In the disciplines where real safety is required (like engineering, aviation, medicine), it's accepted that people will make mistakes. When a system can fail catastrophically due to a simple human error, it's…

I didn't say people are too stupid. On the contrary, we onboard fresh grads onto our large C++ code base every once in a while and they all seem to grasp the concepts just fine.

I'm wondering if most folks throwing shade at C++ had used pre-C++11 toolsets and just have bad memories of the experience.

FWIW, I find modern C++ genuinely great to read / easy to parse by humans (same for similar languages like C#, Java, JavaScript/Typescript) whereas reading Rust (in particular function definitions) is painful.

Re: C++ creator rebuts White House warning

#26
post #24

Earlier quoted context omitted.

Safe modern c++ is poorly understood compared to the decades of experience and knowledge corpus around old practices. The unsafe ways are still easily accessible and widely used, taught, and understood. C++ also is laden with complexity and idiomatic styles, immense foot cannons, etc. Rust is fairly explicit with what’s unsafe (ie unsafe) and safety is default. It’s also generally a simpler language overall with less…

Scratch is simpler than Rust and a lot safer. That's absurd, but maybe that's where we're headed?

It’s not very metal tho

Re: C++ creator rebuts White House warning

#27
post #3

> I find it surprising that the writers of those government documents seem oblivious of the strengths of contemporary C++ and the efforts to provide strong safety guarantees No, Bjarne needs to realize that RAII and smart pointers are an old concept now, and they have shown to be insufficient, for decades now. The bar for safety has been raised, and the Modern C++ is so behind, they don't even understand the issue, a…

not all applications need safety

it is wrong to force safety onto the programmer especially if there is a cost to be paid to obtain it

Re: C++ creator rebuts White House warning

#29

Stroustrup as always fails to recognize the vast surface area of C++ features, foot cannons, and the heavy weight of C compatibility around C++ neck. C++ barely made sense in 1995. It makes absolutely no sense today.

I would argue that it made sense for performance-sensitive code until the maturation of Rust, so it made sense even in 2015. But not today.

you pay a performance penalty

and i don’t want to learn another language and package management system

Re: C++ creator rebuts White House warning

#30
post #9

I agree; you can write perfectly safe and noncompromisingly performant code in C++ much better than any language today. It's genuinely difficult to understand why Rust gets rammed down everyone's throats lately; do they really think developers coming out of universities today are too stupid to grasp memory management? If that's the case, why not have everyone code in Scratch? That memo reads like "to avoid wet pants,…

agree not sure why this is downvoted
Post reply on HN