From: Peter Dimov (pdimov_at_[hidden])
Date: 2005-11-25 12:09:12
David Abrahams wrote:
> "Peter Dimov" <pdimov_at_[hidden]> writes:
>> David Abrahams wrote:
>>> "Peter Dimov" <pdimov_at_[hidden]> writes:
>>>> ("Archive" implies persistency, and relying on a specific
>>>> memory layout is not a way to achieve it.)
>>> I think Robert's statement
>>> "Here, we use the term "serialization" to mean the reversible
>>> deconstruction of an arbitrary set of C++ data structures to a
>>> sequence of bytes. [...]
>> Robert's statement is not at odds with what I wrote above.
> What you wrote above implies additional constraints not present in
> Robert's statement. He doesn't say anything about persistency. I can
> think of many useful Archives that don't "persist" in any meaningful
> way. Whether those correspond to your notion of the word "archive" is
> another matter.
In fact, even Robert's statement doesn't describe all archives; we've been
simplifying a bit. But this aside...
OK, let's assume that you are right and I am wrong about the meaning of
"archive". How does this advance your argument?
>> What do you perceive as the important difference between providing
>> an optimize_array overload that returns mpl::true_ and providing a
>> save_sequence overload that calls .save_array? (Except that the
>> latter is obviously more flexible.)
> It's not a major difference; I have merely been giving rationale for
> our choices and preferences. In short:
> a. Less code to write and fewer opportunities to make mistakes. Not
> a big difference, but a difference nonetheless.
> b. The ability to use a base class to implement common
> functionality. That's useful when accomodating Robert's desire
> not to modify his existing library code in any way, if you want
> to avoid duplicating support for std::vector and builtin arrays.
> In short, your simple proposal would, I think, be a major improvement.
> However, it is incomplete, it doesn't address Robert's constraints,
> and it imposes a bit more work than necessary on archive authors.
Let's start from here.
Why is it incomplete?
How could it address Robert's constraints less than your proposal, which is
What additional work does it impose on archive authors?
Can you illustrate the answers to these questions with examples? They can
help me understand (a) and (b), too.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk