3 ms·
> You don't see this in other languages so much. People just use those languages and "they" have to fix any flaws. You absolutely do see that elsewhere, and th
by n2d4 3y ago
> You don't see this in other languages so much. People just use those languages and "they" have to fix any flaws.
You absolutely do see that elsewhere, and that's why here on HN we have a different new JS framework every day.
The safety in Rust (and .NET, and Java) doesn't come from the `unsafe` keyword, it comes from the guarantees that you have when you don't use said keyword. Ownership, garbage collectors, and less undefined behaviour are some reasons why those languages are considered safer.
At the end, memory safety is a spectrum, and while you can still break Rust's (or even Java's) memory model, it's much harder to do so unintentionally. That's a win. Even if there are some undefined edge cases!
- jurschreuder 3y agoThat sounds great, and that's the narrative you constantly hear. Java, .NET are memory safe. BUT: they all have more vulnerabilities on average than C++. So just saying, memory safety alone does almost nothing to make a language safe. Why would Rust be so much safer than C++ if so almost all other languages also have memory safety but are on average less safe than C++? Meaning more vulnerabilities (so not only memory safety just to be very clear)