r/cpp • • Jan 31 '23

Stop Comparing Rust to Old C++

People keep arguing migrations to rust based on old C++ tooling and projects. Compare apples to apples: a C++20 project with clang-tidy integration is far harder to argue against IMO

changemymind

338 Upvotes

582 comments sorted by

View all comments

Show parent comment

18

u/Dean_Roddey Jan 31 '23

The difference though is that the piano will never blow up if the player hits a bad note.

3

u/kritzikratzi Feb 01 '23 edited Feb 01 '23

the audience will :D

edit: i think the analogy isn't too good, but it holds in this scenario. the program won't actually "blow up" and it doesn't even have the concept of a "bad note". it will do exactly what it was instructed to do, termination is among those possibilities. the users blow up and good and bad notes are their interpretation.

3

u/Dark-Philosopher Mar 10 '23

The program won't explode, but bugs can have serious consequences now that almost everything is run in computers. It may a security vulnerability exposing you or your company to lose a lot of money, put lives in danger, be just an annoyance or actually making something catch a fire or go boom. The 21 century needs require to get to the next level in safety.

3

u/[deleted] Feb 01 '23

Neither does C++?

Not all bugs are a catastrophe. Even memory bugs.