Working on new binary serialization module for phobos (hopefully)
Basile Burg via Digitalmars-d
digitalmars-d at puremagic.com
Tue Jun 2 03:32:24 PDT 2015
On Monday, 1 June 2015 at 12:52:45 UTC, Sean Campbell wrote:
> I've been working on a new serialization module for Phobos and
> its only reliant on 4 Phobos modules
> it is available at
> https://github.com/sycam0inc/phobos/blob/master/std/experimental/serialization.d
>
> I would like some feedback on it
We are many on this segment. Your one is "under-featured". One
thing i need in serialization is the use of prop getter to
serialize and prop setter to deserialize (*) and not only a dump
of the fields that __traits() can find.
That's why i also done mine:
https://github.com/BBasile/iz/blob/master/import/iz/serializer.d
based on the concept of property descriptor, UDA anotations:
https://github.com/BBasile/iz/blob/master/import/iz/properties.d
However still not happy with it...
Maybe with every other examples that people gave you, you'll get
a better idea of how to design the thing.
One plus is that your code is very clean.
---
(*): an obvious reason is that when you change a piece in an
engine you don't just drop it under the hood and it's done. You
have to demount and remount a lot of pieces...that's what the
setters do silently.
More information about the Digitalmars-d
mailing list