2 ms·
IMHO the best alternative to pointers is "tagged index handles" as described here: https://floooh.github.io/2018/06/17/handles-vs-pointers.html https://floooh.
by flohofwoe 7y ago
IMHO the best alternative to pointers is "tagged index handles" as described here:
https://floooh.github.io/2018/06/17/handles-vs-pointers.html https://floooh.github.io/2018/06/17/handles-vs-pointers.html
This approach drastically reduces the risk of memory corruption in usafe languages, and at the same time keeps data structures compact because handles rarely need to be 64-bits
(it's a bit similar to the compressed pointers described in the original post, basically split pointers into a "private" base pointer, and a public offset/index, and use some bits in the public value for dangling protection).