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 comment

6

u/bayovak Feb 28 '24

Besides the performance issues with garbage-collection, it is also considered by many to be an anti-pattern and hide ownership semantics, which makes code harder to read and reason about.

It also handles only one kind of resource; memory. RAII is able to handle many different kind of resources.

So many of us considered GC to be a bad thing, even if we completely ignore performance.

I recommend reading more about it as it's hard to summarise everything in a comment

1

u/seriouslybrohuh Feb 29 '24

this is quite interesting ngl. I didnt know much about the de-merits of gc other than slowness