On Tue, May 26, 2009 at 2:35 AM, Denis Koroskin <[email protected]> wrote: > On Tue, 26 May 2009 13:29:39 +0400, Qian Xu <[email protected]> > wrote: > >> BCS wrote: >> >>> I'm planning on taking a crack at a Serialization template library and >>> I'm >>> looking for feed back. My thinking so far is up on my blog here: >>> >>> >> >> http://arrayboundserror.blogspot.com/2009/05/serialization-for-d-part-1-of-n.html >>> >>> Please comment! (here or there, doesn't matter, I think I'll see both) >> >> A question: >> Should every object contain "mixin Serializable!()" in its declaration? >> It is easy to add this in own classes, but not easy to 3rd-party >> libraries. >> for instance: tango >> >> >> --Qian >> > > Good serialization library supports external serialization via template > specialization (or similar tricks) :)
I'll also add that you should be able to properly serialize/deserialize a BaseClass pointer that actually points to a DerivedClass. This is pretty tricky to get working seamlessly when combined with the external serialization requirement. H3r3tic's xpose library has this working IIRC. --bb
