Re: std.serialization: pre-voting review / discussion

2013-09-21 Thread mrd

On Thursday, 22 August 2013 at 13:13:48 UTC, Jacob Carlborg wrote:

On 2013-08-22 13:57, ilya-stromberg wrote:


Can std.serialization load data from old file to the new class?


Yes. In this case it will use the name of the instance fields 
when searching for values in the archive.


Is this the right way?

There are special formats (Protocol Buffers, for example) for a 
binary format what can be changed over time without breaking old 
code.


But for normal serialization is not this redundant?
Besides, search by name slower compared with other methods (field 
numbers, for example).


Re: std.serialization: pre-voting review / discussion

2013-09-21 Thread mrd

On Thursday, 15 August 2013 at 07:07:13 UTC, Jacob Carlborg wrote:

On 2013-08-14 21:55, ilya-stromberg wrote:

Can you use another serialization format and supports file 
output for

it? For example, can you use JSON, BSON or binary format?


The idea of the library is that it can support multiple archive 
types. Currently only XML is implemented. I have been working 
on a binary archive for a while but I haven't finished it yet.


I am also working on my own binary archive implementation (I just 
want to quickly get a serialization of integral types, arrays and 
structs into binary) and I have a question:


What is the purpose of the "keys"?
If they really needed, can it be realised as option and disable 
them?
(I see also that they are forces to add a lot of duplicate 
functions.)


I guess if it succeeded binary format can be made very compact 
(and possibly faster) as Protocol Buffers.