this post was submitted on 31 Oct 2023
8 points (90.0% liked)

C & C++

889 readers
3 users here now

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] solrize@lemmy.ml 3 points 1 year ago

I don't think it's possible to make C++ safe without strictly limiting the user program to a subset of the language. There are guidelines for that (https://github.com/isocpp/CppCoreGuidelines) but even when I try to code in that style, I get to debug crashes the usual way. C++ makes some optimizations possible through e.g. move semantics that are absent from Rust and Ada but I wonder if it really matters these days. Rust seems to be displacing C++ for lots of new projects going forward.