4 ms·
> Rust guarantees memory safety with a feature called ownership. Ownership works differently from a garbage collector in other languages, because it simply cons
by avaldes 6y ago
> Rust guarantees memory safety with a feature called ownership. Ownership works differently from a garbage collector in other languages, because it simply consists of a set of rules that the compiler needs to check at runtime.
At runtime?
- scoutt 6y agoSome at compile time, some at runtime (RefCell).
- stefs 6y agostill, compile time would have been correct. if the checks were at runtime, it wouldn't be different from a GC.
- scoutt 6y ago“Both” runtime and compile time would be correct. Runtime checks has nothing to do with GC. Bounds checking has nothing to do do with GC for example.
- unanswered 6y agoThe compiler has nothing to do with the runtime checks. The quoted sentence makes it seem like there's a rust runtime, which there isn't.