Request for review - std.serialization (orange)
Francois Chabot
francois at chabs.ca
Mon Jun 17 06:31:32 PDT 2013
On Tuesday, 2 April 2013 at 18:50:04 UTC, Jacob Carlborg wrote:
> It probably makes sense if one sends the data over the network
> and the data is mostly value based. I usually have an object
> hierarchy with many reference types and objects passed around.
I think that's kinda the sticking point with Orange for me.
Integrating it in my current project implied bringing in a huge
amount of code when my needs are super-straightforward.
I actually ended up writing myself a super-light range-based
serializer that'll handle any combination of struct/Array/AA
thrown at it. (for reference:
https://github.com/Chabsf/flyb/blob/SerializableHistory/serialize.d
). It also does not copy data around, and instead just casts the
data as arrays of bytes. It's under 300 lines of D code and does
everything I need from Orange, and does it very fast. Orange is
just so very overkill for my needs.
My point is that serializing POD-based structures in D is so
simple that using a one-size-fit-all serializer made to handle
absolutely everything feels very wasteful.
More information about the Digitalmars-d
mailing list