Hacker News new | ask | show | jobs
by CJefferson 3103 days ago
On the other hand, a buggy C++ program is still better than no rust program.
2 comments

Having had to track down memory data races in a production C++ codebase I'm not sure that I completely agree with your assessment.
I've once spent quite a few hours debugging a dangling pointer that wasn't zeroed after delete and was written to which might or might not have corrupted a piece of lua interpreter's state.

fixing that felt good. the preceding 24 hours, not so much.

Yup.

Data races are particularly nasty because any print statements or debug tracing can trigger a memory fence/reorder and make the problem disappear.

Nothing more frustrating then adding a printf only to see the issue no longer manifest.

Trivially false: buggy autopilot software is, many times, worse than no autopilot software if the bug is “blow up immediately”.

Some problems are worth the time to solve them.

Ok yes, I wouldnt write an autopilot in C++.

However, for example, on the average desktop or mobile app, it's not clear to me(yet!) it is worth the pain of writing in rust.

For the average desktop or mobile app it’s rarely worth it to write in any language with manual memory management.
but I'm not writing autopilot software and rust isn't going to save you from everything.