Serializing persistent/functional data structures
Posted
by Rob
on Stack Overflow
See other posts from Stack Overflow
or by Rob
Published on 2010-03-20T18:03:01Z
Indexed on
2010/03/20
18:21 UTC
Read the original article
Hit count: 221
persistent
|functional-programming
|data-structures
|serialization
|language-agnostic
Persistent data structures depend on the sharing of structure for efficiency. For an example, see here.
How can I preserve the structure sharing when I serialize the data structures and write them to a file or database? If I just naively traverse the datastructures, I'll store the correct values, but I'll lose the structure sharing. I'd like to be able to save data-structures with shared components to a file, restore them, and still have most of the structure shared in the restored data.
© Stack Overflow or respective owner