Request for review - std.serialization (orange)

Manu turkeyman at gmail.com
Sun Mar 24 18:16:19 PDT 2013


Just at a glance, a few things strike me...

Phobos doesn't typically use classes, seems to prefer flat functions. Are
we happy with classes in this instance?
Use of caps in the filenames/functions is not very phobos like.

Can I have a post-de-serialise callback to recalculate transient data?

Why register serialiser's, and structures that can be operated on? (I'm not
a big fan of registrations of this sort personally, if they can be avoided)

Is there a mechanism to deal with pointers, or do you just serialise
through the pointer? Some sort of reference system so objects pointing at
the same object instance will deserialise pointing at the same object
instance (or a new copy thereof)?

Is it fast? I see in your custom deserialise example, you deserialise
members by string name... does it need to FIND those in the stream by name,
or does it just use that to validate the sequence?
I have a serialiser that serialises in realtime (60fps), a good fair few
megabytes of data per frame... will orange handle this?

Documentation, what attributes are available? How to use them?

You only seem to provide an XML backend. What about JSON? Binary (with
endian awareness)?

Writing an Archiver looks a lot more involved than I would have imagined.
XmlArchive.d is huge, mostly just 'ditto'.
Should unarchiveXXX() not rather be unarchive!(XXX)(), allowing to minimise
most of those function definitions?


On 25 March 2013 07:41, Andrej Mitrovic <andrej.mitrovich at gmail.com> wrote:

> On 3/24/13, Jacob Carlborg <doob at me.com> wrote:
> > For usage examples, see the github wiki pages:
> > https://github.com/jacob-carlborg/orange/wiki/_pages
>
> A small example actually writing the xml file to disk and the reading
> back from it would be beneficial.
>
> Btw the library doesn't build with the -w switch:
>
> orange\xml\PhobosXml.d(2536): Error: switch case fallthrough - use
> 'goto case;' if intended
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20130325/5fc02af3/attachment-0001.html>


More information about the Digitalmars-d mailing list