Collaborative Editing Documents
作者谈及在给 CodeMirror 6 选择协同编辑支持方案时的一些考虑。
依旧使用了 ProseMirror 在用的 OT 模型，而不是 CRDT，对于文档协同来说，支持真正的分布式可能没那么重要。
Operational Transformation 是一种 hack ? 当文档结构比纯文本更复杂，很难定义一种正确收敛的转换函数。
The main problem is that this technique is hard to reason about. It has many practical advantages but, being a hack, doesn't provide the kind of mental framework that would allow you to confidently apply it in different situations.
提出一些 OT 不是很好处理的场景，例如 Mapped position 很难处理
This is kind of weird. It took me a while to accept that we can make documents converge, but not positions, which are so much simpler. The explanation for that is, I guess, that for document maintenance, what is inside deleted ranges becomes irrelevant as soon as those ranges are deleted, whereas position mapping, to be robust, would still need to be able to compare positions inside such ranges.