|
Boost : |
From: Robert Ramey (ramey_at_[hidden])
Date: 2004-04-19 11:03:04
Jeff Garland wrote:
>> Robert Ramey wrote:
>> So I'm skeptical of trying to adjust to "old" proprietary formats
>> with the serialization library.
> Well, I believe you are taking too narrow a view here.
OK, I'll expand my horizon a bit. I can see how one might want to make
special purpose archive which only handles a subset of all possible C++
structures. So it really comes down to evaluating the specific situation.
There is nothing in the serialization library which conflicts with such
usage so I'm happy to remain agnostic ( though still perhaps wary ) on this
case.
I wonder what happens when we need "special" information in the archive. I
faced the same problem with XML where we need the name of the instance
variable. I solved it by making the NVP wrapper which has worked well.
However it does introduce a coupling between the archive and the
serialization which I had strived to avoid. The best I could do was to make
it optional and transparent to those archives which didn't use it. In order
to do this I had to make all archive classes aware of it. Well, for XML
this might be justified but in general I would find it objectionable.
When one makes the archive dependent upon the serialization (E.G. by
addressing only a subset of all C++), he won't be able to run the torture
test suite. Personally, I consider this a significant liability.
So anyway, if it works for a specific problem, then of course I've got no
concerns.
If its proposed as addition to the library, I would like to see it be
universal as the current ones are - if only for the reason that a new
archive can be subjected to the torture test with very little effort.
So to summarize, if one wants/needs to make special purpose archive which
handles a subset of all types - no problem. But it probably would not be of
interest outside of the particular application.
Robert Ramey
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk