Comment by ummonk
21 hours ago
Zig is less memory safe than Rust, but more than C/C++. Neither Zig nor Rust is fundamentally memory safe.
21 hours ago
Zig is less memory safe than Rust, but more than C/C++. Neither Zig nor Rust is fundamentally memory safe.
What? Zig is definitively not memory-safe, while safe Rust, is, by definition, memory-safe. Unsafe rust is not memory-safe, but you generally don't need to have a lot of it around.
Safe Rust is demonstrably not memory-safe: https://github.com/Speykious/cve-rs/tree/main
This is a compiler bug. This has no bearing on the language itself. Bugs happen, and they will be fixed, even this one.
11 replies →
The second you have any `unsafe`, Rust is _by definition_ not memory-safe.
By that definition, Python is not memory-safe, Java is not memory-safe, Go is not memory-safe, and so on. All of these languages contain escape hatches to do memory-unsafe stuff, yet no one is calling them memory unsafe.
1 reply →
And the majority of the Rust standard library uses `unsafe`.
1 reply →
By definition yes. There were a lot of lies to persuade managers. You can write a lot into your documentation.
But by implementation and spec definitely not.