Hacker News new | past | comments | ask | show | jobs | submit login

Meh. Rust's safety guarantees typically depend on:

- Soundness of their semantics at a conceptual level

- Correct implementation of the semantics in rustc (in Rust)

- Correct translation of those semantics to LLVM IR targeting OS syscalls in rustc (in Rust)

- Correct translation of LLVM IR to native code in LLVM (written in C++)

- Correct implementation of OS syscalls (typically in C)

Python's safety guarantees typically depend on:

- Soundness of their semantics at a conceptual level

- Correct implementation of the semantics in CPython (in C)

- Correct translation of C to LLVM IR targeting OS syscalls in Clang (in C++)

- Correct translation of LLVM IR to native code in LLVM (written in C++)

- Correct implementation of OS syscalls (typically in C)

Both are typically contingent on correct implementation of a huge swath of C/C++ and Rust code. Even if the entire stack were written in Rust, it still wouldn't be sufficient to guarantee memory safety, since bugs anywhere in the stack could introduce memory unsafety into compiled Rust code.

Rust's guarantees come entirely at the first two layers of the stack: If the semantics are sound, and the semantics are implemented correctly in rustc, then the generated LLVM IR (treated abstractly) has memory safety. Python has similar guarantees: if its semantics are sound, and the semantics are implemented correctly in CPython compiler/interpreter, then the resulting execution of the interpreter has memory safety.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: