Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think another solution could be to use an arena/memory pool to replace indices with references.

But indices are still safer than raw pointers - vec access does bounds checks. You can make indices typed if you’re worried about mixing them up.



I mentioned slab/bump allocators in the README. But whether it works with the Ptrlist type punning is unclear to me.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: