Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I get that it makes sense at his level, but my impression is that mistakes in the business logic are both more common and more financially painful for the company than the memory safety issues that Rust solves when compared to C++.

Unsafe binary? Run it in docker.

Crashes? Run two and monit.

RAM leak? Restart with cron.

Now I'm not saying that these are good solutions, but they are good enough so that plenty of companies get away just fine with running buggy c++ software in production. So in my opinion, the biggest improvements come from better abstractions and good libraries. And c++ still has the lead there.



Rust also solves many classes of logical issues through ADTs and pattern matching. And many classes of thread safety issues. Memory safety is an important part of Rust but not all of it.


I don't know much about ADTs, but I'm skeptical they would help me for my own programs since most of my logic errors boil down to wrong math...


It is true that Rust won't catch bad math or a flipped not sign, but it catches just about everything else, which is very valuable since brainpower can be devoted to just the subset of issues it doesn't catch.


> but it catches just about everything else

Sounds pretty hyperbolic to me.


If you think that an unsafe binary is safe if you run it in docker then I challenge you to run, on your personal computer, this program in docker:

https://arstechnica.com/information-technology/2022/09/new-l...

use this picture in a hexeditor:

https://cdn.arstechnica.net/wp-content/uploads/2022/09/shiki...


I feel like this is very much outside the scope of "Rust is more safe than C++". I was talking about shielding from accidental bugs in an otherwise well-designed server where Rust would reduce the severity of one error class (out of many).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: