Hacker News new | ask | show | jobs
by valtron 4533 days ago
Don't points 2 & 3 together imply that anything that uses built-ins, which I assume are implemented with C FFI, is `unsafe`?
3 comments

No, “unsafe” means “evaluate this unsafe block as though it were safe”. This enables Modula-style safe interfaces for unsafe implementations.
Just to clarify, using a `unsafe` block in a function does NOT mean that you have to tag that function as unsafe.
I'm not 100% sure exactly what you mean by 'built-ins', but Rust is almost entirely written in Rust. I don't think there's anything major implemented via C FFI in the compiler itself.