r/cpp • • Sep 17 '22

Cppfront: Herb Sutter's personal experimental C++ Syntax 2 -> Syntax 1 compiler

https://github.com/hsutter/cppfront
335 Upvotes

360 comments sorted by

View all comments

Show parent comments

0

u/ThymeCypher Sep 18 '22

I get where you’re coming from but especially from a security perspective, C++’s difficulty means insecurity comes from bad code not bad developers, pushing anything off to the compiler means every project that uses that compiler must also trust the developers of that compiler to write secure code. PHP vulnerabilities exist quite often, C++ ones not so much, it’s usually C++ libraries and not the language itself. Lowering the barrier of entry isn’t necessarily good because there’s nothing inherently wrong with C++, and it’s difficulties are a positive in this regard.

Now if you mean insecure as in unstable, C++ is far from unstable, just because they’re constantly evolving it does not mean you must use the latest and if anything few do. Rust is still far too new to be considered a stable platform, no matter how solid it appears; critical issues can and do often come in code viewed by millions without question, and far fewer eyes are on Rust at any given time.

4

u/Dean_Roddey Sep 18 '22

If even very good programmers didn't make mistakes, we'd not even need C++'s helper features. But, they do. Too many of those vulnerabilities that exist in C++ code come from things that Rust wouldn't even compile, and they can be there for years or decades no matter how many eyes on on that code.

0

u/ThymeCypher Sep 19 '22

If you take examples where that has happened you can make the case but you miss my point entirely - Java and PHP vulnerabilities have requires full SDK/Engine updates to fix. If a vulnerability exists in Rust it will require the same. That cannot happen with C++.

2

u/Dean_Roddey Sep 19 '22

I'm not sure what you are talking about? Rust is natively compiled language just like C++.

→ More replies (7)