News for hackers. Stuff that matters.
Re:Comparative unsafety by stefan_ on Friday April 09, 2021 @12:03PM (#26752278)
In general unsafe should be viral: you can't call unsafe without yourself being unsafe. But it hits the same "snag", then nothing works anymore.
Re:Comparative unsafety by Jweb_Guru on Friday April 09, 2021 @01:33PM (#26753467)
If `unsafe` were viral it would be useless. Syntactically ill-typed code can still be proven semantically well-typed, and `unsafe` is intended as a marker that the proof of semantic soundness lies outside of Rust's type system. If there is no proof (at least an informal one), you shouldn't be using unsafe, generally speaking.
Re:Comparative unsafety by nynx on Friday April 09, 2021 @01:23PM (#26753303)
This is not true. Rust is based around the idea of encapsulating unsafety within interfaces that are safe to use.