3 ms·
> Even the text editor example in the GoF book just assigned each character a (shared, CoW) style object... Does anyone actually do it this way? Emacs does. It
by geocar 5y ago
> Even the text editor example in the GoF book just assigned each character a (shared, CoW) style object... Does anyone actually do it this way?
Emacs does. It has something called "text properties"
https://www.emacswiki.org/emacs/TextProperties#text_property https://www.emacswiki.org/emacs/TextProperties#text_property
Colorforth also works this way.
https://colorforth.github.io/parsed.html https://colorforth.github.io/parsed.html
The complication arises when you insert text: Users generally prefer to insert a letter between two bold characters and have the word processor "assume" the user meant to type boldface, rather than push a button to put the insert-function into "create bold letters" mode.