2 ms·
As others have pointed out to you. Memory safety is enforced at compile time through static analysis. This does not mean the absence of runtime checks - that is
by vlovich123 1y ago
As others have pointed out to you. Memory safety is enforced at compile time through static analysis. This does not mean the absence of runtime checks - that is a property you are injecting into the definition and arguing about.
RefCell enforces memory safety too by doing the lifetime enforcement at runtime by using UnsafeCell to provide certain semantics. But the compiler ensures that the RefCell itself still has correct lifetimes and is used correctly, resulting in a compile time guarantee that the code that’s run is memory safe.
- bgwalter 1y agoSince it seems that Rust programmers are unable to provide a definition for "memory safety", here is what more mature and academically minded people think: https://blog.adacore.com/memory-safety-in-rust https://blog.adacore.com/memory-safety-in-rust Notice that in-bounds indexing is included, same as in the definition from this submission that I quoted at you.
- vlovich123 1y agoAgain, no one is arguing that bounds checking isn’t required for memory safety. You are intentionally continuing to argue against a position no one has taken anywhere that Rust somehow always has 0 runtime safety checking and everything happens statically at compile time. Literally RefCell and array bounds. I keep trying to clarify the wording that’s in the article and what it’s intended to mean that you have issue with and instead you keep insisting it means the wrong thing literally no one has argued for.