Remix.run Logo
drivebyhooting 7 hours ago

Come on that’s not true. How would you write and LRU cache in rust? It’s not possible in idiomatic rust. You either need to use unsafe or use integer indices as a poor man’s pointer.

mattgreenrocks 7 hours ago | parent | next [-]

Indices are fine. Fixating on the “right” shape of the solution is your hang-up here. Different languages want different things. Fighting them never ends well.

ycombinatrix 7 hours ago | parent | prev [-]

What's wrong with integer indices? They have bounds checking. You definitely do not need unsafe to do LRU.