3 ms·
> With unsafe you get exactly the same kind of semantics as C People seem to disagree. Unsafe Rust Is Harder Than C https://chadaustin.me/2024/10/intrusive-l
by lenkite 2y ago
> With unsafe you get exactly the same kind of semantics as C
People seem to disagree.
Unsafe Rust Is Harder Than C
https://chadaustin.me/2024/10/intrusive-linked-list-in-rust/ https://chadaustin.me/2024/10/intrusive-linked-list-in-rust/
https://news.ycombinator.com/item?id=41944121 https://news.ycombinator.com/item?id=41944121
- kibwen 2y agoUsing references in unsafe Rust is harder than using raw pointers in C. Using raw pointers in unsafe Rust is easier than using raw pointers in C. The solution is to not manipulate references in unsafe code. The problem is that in old versions of Rust this was tricky. Modern versions of Rust have addressed this by adding first-class facilities for producing pointers without needing temporary references: https://blog.rust-lang.org/2024/10/17/Rust-1.82.0.html#native-syntax-for-creating-a-raw-pointer https://blog.rust-lang.org/2024/10/17/Rust-1.82.0.html#nativ...