3 ms·
Would it work in a CRDT context, where ordering is hard and so versions could only be local?
by Kinrany 3y ago
Would it work in a CRDT context, where ordering is hard and so versions could only be local?
- orlp 3y agoThere are two kinds of versions here. The CRDT version and Slotmap's internal version. I am not proposing you merge the two concepts, rather that instead of a Vec and simple indexes you use a Slotmap and keys, which then does allow deletion at the data structure level (figuring out the deletion in a CRDT fashion is something else). The rest of the design would stay the same. I'm not even saying that it's a particularly good fit here, especially if you wish to support undos. It's more of a future tip for when you want to use a similar pattern in a context where you really do want deletions.