Re:Clang vs. Clang
by usefulcat on Saturday August 03, 2024 @11:33PM
(#41151003)
I'm familiar with that very sort of bug, but I don't see how it's a failure of the language. To be convinced of that I think I'd at least need to be shown what a good solution to that problem would look like (at the level of the language and/or standard library).
[ Parent
| on HN ]
Rust statically enforces that you have exclusive access to a collection to mutate it. This prevents also having an active iterator.
You also have languages using immutable or persistent data structures in their std lib to side-step the problem.