
23 Jun
2007
23 Jun
'07
8:01 a.m.
Greg Meredith wrote:
First, has anyone worked out a monadic approach to copy-on-write? (And, Is there any analysis of perf characteristics of said monadic schemes?)
If you use Zippers (Huet's or generic ones) with functional updates, copy-on-write comes out automatically and by default. This is explained in http://okmij.org/ftp/Computation/Continuations.html#zipper and, in a more readable form, in a recent paper http://okmij.org/ftp/papers/context-OS.pdf The web page also contains the complete code.