Formal Review of std.serialization

Jonas Drewsen nospam4321 at hotmail.com
Mon Jun 10 14:40:57 PDT 2013


A quick first look for now:

In general I think that you should clone phobos and merge orange 
into std.serialize in order for us to see how it really fits into 
phobos.

As such I think it feels more like a RFC than formal review 
because it couldn't possible go into phobos in its current state 
even if we ignored all comments from the this list.

Now for something more constructive :)


> * I'm using some utility functions located in the "util" and 
> "core"
> packages, what should we do about those, where to put them?

The core package only have the core.Attribute module which 
defines a meta attribute which is a new concept in phobos. I 
guess that should either be removed or we should spawn a 
discussion about if we want such a thing or not. Is it possible 
to do without it?

The util package
----------------

util.use.d : I think the Use struct feels a bit like abusing the 
'in' operator to work around D not supporting blocks or something 
else that would provide the desired syntax. Personally I think it 
should go.

util.traits.d : Most of them should go to std.traits or use 
something from std.traits instead if possible

util.reflection.d : Should probably be part if std.traits as well 
since there are already some reflection code in there. I guess 
std.traits should make use of the new package.d thing to split up 
the module into several files.

util.ctfe.d : Wouldn't now where to put it.

util.collection.array : should probably go into std.exception


It seems all the module filenames are camel cased. They should be 
all lowercase.

The _.d modules should probably be renamed to package.d now.


> * The unit tests are located in its own package, I'm not very 
> happy
> about putting the unit tests in the same module as the rest of 
> the code,
> i.e. the serialization module. What are the options? These test 
> are
> quite high level. They test the whole Serializer class and not
> individual functions.

IMHO I think the tests would fit nicely into the package itself. 
Close to the code it tests.

> https://dl.dropboxusercontent.com/u/18386187/orange_docs/Serializer.html

Could you provide the docs formatted as it would be in dlang.org 
since only that way it is also possible to review formatting.

Keep up the good work. I for one are really looking forward to 
finally getting this thing in.

/Jonas




More information about the Digitalmars-d mailing list