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

There are design decisions you can reasonably question in Rust but the big one that justifies its existence is memory safety. It's simply too important. Not everything needs it but key infrastructure, most notably Web browsers, do.

I predict we will be having buffer overrun CVEs in C/C++ code for as long as we have C/C++ code.

The realities of writing safe, multithreaded C/C++ on processors with out-of-order processing, context switching and branch prediction is simply too complex to get right 100% of the time. Rust makes writing certain code difficult because it is difficult to do/ C/C++ fools you into believing something is safe because you've never encountered the circumstances where it isn't.

We have tools like valgrind to try and identify such issues. They're certainly useful. But you'll be constantly chasing rabbits.

I've seen thread and memory bugs in production code written by smart, highly-paid engineers at big tech companies that have lain dormant for the better part of a decade.

That's why Rust exists.



Problem is, unsafe rust is as crappy as C/C++ safety-wise, just with worse tooling. And lots of things that C/C++ does can't be done without unsafe rust.

Rust will never take over and something like C/C++ will always be with us.


Every single language we use to write software outside C++ is memory safe.

It's important, we got it years ago. With Java.




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

Search: