Does an ECS system simply side-step the borrow-checker rather than working with it?

152 points burntoutpotato

I learned that an ECS system is a more natural way to architect a code in Rust, as opposed to OOP way, since, for one, it meshes well with the borrow checker and prevents proliferation of Rc, Arc usage that beginners like me struggle with.

However, I feel like it just replaces the OOP "pointers" with ECS "IDs". We hold on to and pass around these Copyable id's for the objects without fighting the borrow checker. Isn't this just side-stepping the entire purpose of having the borrow-checker in the first place? How does ECS guarantee the object corresponding to the ID is still alive or replaced by another object? Is the ID something like a smart pointer?

Note : I understand there are more reasons to prefer one system over the other. I am not considering the potential computational benefits from having data arranged contiguously for this discussion.