News for hackers. Stuff that matters.
Re:Four limitations of Rust's borrow checker by throwawaymaths on Tuesday December 24, 2024 @01:29PM (#42503807)
and you now have unchecked use-after-decommisioning-the-index and double-decommission-the-index errors, which could be security regressions
Re:Four limitations of Rust's borrow checker by estebank on Tuesday December 24, 2024 @01:32PM (#42503833)
That's true only if you use Vec<T> instead of a specialized arena, either append only, maybe growable, or generational, where access invalidation is tracked for you on access.
Re:Four limitations of Rust's borrow checker by oconnor663 on Tuesday December 24, 2024 @02:22PM (#42504214)
Yeah if you go with Vec, you have to accept that you can't delete anything until you're done with the whole collection. A lot of programs (including basically anything that isn't long running) can accept that. The rest need to use SlotMap or similar, which is an easy transition that you can make as needed.