3 ms·
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
by drivebyhooting 9mo 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.
- ycombinatrix 9mo agoWhat's wrong with integer indices? They have bounds checking. You definitely do not need unsafe to do LRU.
- mattgreenrocks 9mo agoIndices 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.