this post was submitted on 30 Nov 2023
-1 points (45.5% liked)

C++

1779 readers
2 users here now

The center for all discussion and news regarding C++.

Rules

founded 1 year ago
MODERATORS
-1
The Myth of Smart Pointers (www.logikalsolutions.com)
submitted 1 year ago by lysdexic to c/cpp
you are viewing a single comment's thread
view the rest of the comments
[–] 5C5C5C 2 points 1 year ago

What exactly have I backpedaled on in any of my replies?

Rust.

Rust eliminates entire categories of bugs at compile time with performance that is on par with C++ and often better.

I do get bugs in my Rust code, but do you want to know what they are? Once in a while I forget to type a ! in an if-statement. Or I accidentally type && when I meant to type ||. These mistakes are trivially caught in unit tests or with a single run of the application and easily fixed. It's also very rare for me to actually make these mistakes. Almost every single time I compile my Rust code, everything works on the first try. But I confess, once in a while one of these minor bugs slips in there.

So yes bugs are possible in every language. But there's a lot to be said about what kinds of bugs are possible, what the risks of those bugs are, and what the process of mitigating them is like. A memory corruption bug is an entirely different beast from a simple Boolean logic bug.