3 ms·
> Rust cannot remove `unsafe` without being useless for its target, and useless as a language (it wouldn't even have FFI). I like to think of Haskell as a para
by Dewie 12y ago
> Rust cannot remove `unsafe` without being useless for its target, and useless as a language (it wouldn't even have FFI).
I like to think of Haskell as a parallel: It guarantees side effect-free code. But you still need an escape hatch in the form of unsafePerformIO in order to use the FFI. The language's semantics can easily be broken with that functionality, but it seems to be a necessary price to pay if you want to have any kind of FFI. (<- Well, I guess something like Proof Carrying Code could be an alternative..)