Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> There is a set of programs that you can write in C and that are correct, that you cannot write in Rust without leaning into unsafe code. So if by "Rust" we mean "the safe subset of Rust"

Well, unsafe rust is part of rust. So no, we don’t mean that.



If programs were primarily unsafe rust, no one would use the language. Unsafe rust is strictly more difficult to write than C in certain constructs because the complex invariants the rust language requires remain in unsafe, there’s just no compiler proof checking them being upheld.

Is argue that he’s right that generally it’s referring to safe subset and in practice people relax the conversation with a little unsafe being more ok. But as Steve points out it really depends on the definitions you choose.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: