16 ms·
Immutable data makes updates hard and undo easy. It's especially painful in C++. Mutable data makes mutation easy and undo hard. I don't know if there's a goo
by nyanpasu64 7y ago
Immutable data makes updates hard and undo easy. It's especially painful in C++.
Mutable data makes mutation easy and undo hard.
I don't know if there's a good solution. The command pattern is based off mutable data, and works, but has lots of boilerplate and implementation (to mutate the document forwards and backwards).