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

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

-1

u/ThymeCypher Sep 19 '22

C++ doesn’t take care of much for you and easily lets you do what you will, Rust trades off flexibility for “correctness.” The more a language does for you the more of an impact it can have in the final product. I use PHP as an example because it’s by far the most complete language that no other language comes close; as a result it has had some pretty serious vulnerabilities. Rust puts more responsibility on the language and compiler and that comes with risks that anyone who is skilled enough in C++ won’t need.

→ More replies (6)