for C++ we have a marshal function for each class... which calls start_, then marshal for each thing in the class, then finish_. Just use overloading to identify marshal functions (first argument? or should the output_proc and closure be first and then the other stuff?) unmarshal likewise takes an input proc and a closure, and a pointer (or reference?) to storage for the type... should we use stream classes instead of input procs? no: we want to be able to use it conveniently from C too.