4 ms·
I dont understand why this is so hard. If you take a document and enter each character into a database as a separate entry, then only lock each character as it'
by bawana 8y ago
I dont understand why this is so hard. If you take a document and enter each character into a database as a separate entry, then only lock each character as it's changed and unlock it immediately afterwards. The likelihood that all individuals will be modifying the same character at the same time is low. and while it's locked, the person trying to change it will see it's not changing - so they'll try again in a second or two by which time it will be unlocked.
- Skunkleton 8y agoOk, so what happens when you insert a character?
- silasdavis 8y agoThat sounds like a horrible UX
- jerf 8y agoAmong the many other problems with your proposal, you are assuming an editor that can only insert and delete characters, so no selection, copy, paste, search and replace, and any other features that involve modifying more than just one character in a document at a time, since you're critically depending not just on the fact that all edits can theoretically be represented by single character changes but that the rate of such changes must necessarily be very, very low, bounded by human typing speed. "OK, so to fix that, I'll just..." That'll break in some other case. If you then work on fixing that up, in another 20 or 30 steps, you end up at these algorithms. Or something far worse, which is actually pretty likely if you try to bodge something together one hyper-local problem at a time.
- Skunkleton 8y agoNo, op is assuming that an editor can only _replace_ characters.