Chris Nicholas @chrisnicholas.dev · May 12

It gets worse when two users edit at once. Alice inserts an item, Bob deletes one. Both clients are working from their own local array, so when their changes merge, they end up applying ops on top of different states. The list diverges.

1 likes 1 replies

?

Replies

Chris Nicholas · May 12

Fractional indexing flips the model. Each item carries its own position value—a decimal between `0` and `1` that sits between its neighbours. Insert an item between `0.1` and `0.5`? Pick the halfway point, `0.3`. Between `0.1` and `0.3`? It's `0.2`. There's always room.