News for hackers. Stuff that matters.
Re:Four limitations of Rust's borrow checker by simgt on Tuesday December 24, 2024 @10:33AM (#42502531)
> stop using references/lifetimes and start using indexes

Aren't arenas a nicer suggestion? https://docs.rs/bumpalo/latest/bumpalo/ https://docs.rs/typed-arena/latest/typed_arena/

Depending on the use case, another pattern that plays very nicely with Rust is the EC part of ECS: https://github.com/Ralith/hecs

Re:Four limitations of Rust's borrow checker by oconnor663 on Tuesday December 24, 2024 @12:19PM (#42503275)
Yes, Slab and SlotMap are the next stop on this train, and ECS is the last stop. But a simple Vec can get you surprisingly far. Most small programs never really need to delete anything.