Hacker News new | ask | show | jobs
by secondcoming 516 days ago
Is it even possible to write any text editor without some form of rope data structure?
4 comments

Here's a paper reviewing the various choices, that is often mentioned in discussions around data structures for text editors:

https://www.cs.unm.edu/~crowley/papers/sds.pdf

MS Word used piece table, which led to the "fast save" feature - which saved only the newer pieces.
Gap buffers are the other classic option, and there are others too, e.g. piece tables.
Most certainly: gap buffers, piece tables, and line arrays are also popular choices.