Hacker News new | ask | show | jobs
by mamcx 56 days ago
> The language design contract is unsafe by default

False. The language design safe by default, something that you can confirm super easily doing just the Rust tutorials and compare the same with C or C++.

Read the repo well:

   cve-rs implements the following bugs in safe Rust:

   Use after free
   Buffer overflow
   Segmentation fault
NOT REFUTE IT.

> There are unsafe blocks all over the stdlib

Unsafe blocks is not the same that unsafe code. Are marked areas that are required to do escape automated checks, and there, you are at the level of a C/C++ programmer (where in that languages ALL THE CODE IS MARKED UNSAFE).

If you complaint against that, is the same as complaint against ALL THE CODE writer on C/C++.

---

One thing important to understand about Rust: Rust is a system language and SHOULD be able to implement everyting including, Buffer overflow, Use after free , Segmentation fault and such. You should be able to implement a terrible OS, malware, faulty drivers, etc, minimally because that is required to test safe programs!

(example: Deterministic Simulation Testing https://turso.tech/blog/introducing-limbo-a-complete-rewrite...).

But what Rust gives is that not assume that you want to do it for most programs.