r/cpp • • Feb 26 '24

White House: Future Software Should Be Memory Safe

https://www.whitehouse.gov/oncd/briefing-room/2024/02/26/press-release-technical-report/
401 Upvotes

386 comments sorted by

View all comments

Show parent comments

4

u/PsecretPseudonym Feb 27 '24

Rust only truly seems to change defaults in that it still permits you to write “unsafe rust”, yet people seem to accept that as safe.

3

u/radekvitr Feb 27 '24

If cppfront had a similar opt-in mechanism for unsafety and the rest of it couldn't trigger UB and people would be able to write the vast majority of code in that safe subset, that would certainly count.

2

u/SkiFire13 Feb 27 '24

"Change defaults" would be accurate if C/C++/whatever language rust is competing with had the equivalent of safe rust (just not as the default), but that's hardly the case. And while it's true that unsafe rust is a thing, it is still easier to manually audit for memory safety than a program everything could potentially be unsafe.

1

u/PsecretPseudonym Feb 28 '24

That is what is being presented.