Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-02-28 06:55:21


----- Original Message -----
From: "quendezus" <quendez_at_[hidden]>

> I consider the load function as a constructor that takes its
> parameters from the archive (that is why it seems odd to me to
> imagine a deserialization on an object not built with its default
> constructor). In the load function you sometimes need some code (fopen
> ( ) in my example), exactly like in a constructor.
>
> Moreover, the 'describe' scheme

I didn't realize there was just one ;-)

> implies a symetrical management of
> the serialization/deserialization, that I have rarely seen in real
> life code. On the load side you can have validation code, debug code,
> etc. In the save side you can have parsing of the serialized data to
> see which one to keep given the state of the program, etc.

The serialization code I've seen is overwhelmingly symmetrical. Wouldn't it
be good to optimize for the common case?
There are ways to deal with assymmetry, too, when needed (lambda, for
example).

-Dave


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk