[clean-list] Text Editor Undo and Persistent Data Structures...

Fabien Todescato f.todescato@larisys.fr
Mon, 28 May 2001 17:32:36 +0200


Dear Cleaners,

	The earmark of data structures in pure functional programming
languages is that these data structures are automatically persistent - see
Chris Okasaki's book "Pure Functional Data Structures" p.2 -. Except maybe
in Clean for unique data structures, unique arrays for instance.
	Seeing that the text editor in the Clean IDE 2.0 does not support
unlimited UNDO, I guess the underlying data structure used to manipulate
texts is some kind of unique array. Otherwise, the different versions of the
data structure could be stored and restored as the current version when the
user requests an UNDO.

My question about that is : is there some deep reason why unlimited UNDO was
not implemented in the text editor, and is it possible to use a persistent
data structure to implement it ? Are efficient persistent data structures
known that support : insertion and deletion in the MIDDLE of a sequence, and
random access within a sequence.

Thanks, Fabien TODESCATO