|
Boost Users : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2006-07-10 20:00:40
Joel de Guzman wrote:
> Peter Dimov wrote:
>> Joel de Guzman wrote:
>>> Peter Dimov wrote:
>>>
>>>> I can't help but wonder: if some parts of your v1 format are so
>>>> completely redundant as to allow you to reconstruct the original
>>>> data even if you skip them, what was the point of writing them in
>>>> the first place?
>>> Here's one scenario (I'm sure there are others): Your class uses a
>>> 3rd party library called Y. Later, you decide to replace it with
>>> a better engine using a library called Z.
>>
>> Still not getting it. Do you have an example?
>
> That was the example ;)... Ok let me see if I can clarify...
> With version 1 you have a class A with this structure:
>
> class A { W, w, X x; Y rep; };
>
> Now with version 2, you want to use a new engine to replace Y:
>
> class A { W, w, X x; Z rep; };
>
> Z is so different from Y that it does not need any of its data.
> It is also plausible that W,X,Y and Z get some data from other
> external sources. So, in effect, Z starts with a default data and
> gets filled as the app runs.
Right. What I was saying is that if the pair (w, x) is all you need to
reconstruct an A, then there is no need to store the Y part (except
short-term convenience).
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net