-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
One Common Interface Member for Specifying Packing and Unpacking of Classes and Structs #20
Comments
Sorry, I don't understand your comment. |
Carefully read this page https://github.com/atilaneves/cerealed. Cerealed is yet another serialization package for D. Cerealed provides more compact ways of specifying serialization (pack) and deserialization (unpack) in D than msgpack-d does. Examples are
Could msgpack-d be enhanced to provide these features aswell? I really like msgpack's more stable backend format compared to Cerealed and would love to get these features in msgpack-d aswell. |
Line 12 in 23252c5
msgpack-d has @nonPacked attribute. Isn't it enough?
msgpack-d can't provide |
Ahh. Nice. I'd missed that. What about specifying a common serializer (
This may have to be implemented in a templated member function, right? |
I think this approach causes performance degression so I can't implement only this approach. |
Couldn't the behaviour of such a unified pack-unpack function, say Suitable alternative names could be |
@nordlow My 'performance degression' means vtbl call, class MessagePacker
{
/* ... */
}
class MessagePackSerializer : MessagePacker
{
Packer packer;
/* do packing */
}
class MessagePackDeserializer : MessagePacker
{
Unpacker unpacker;
/* do unpacking */
} |
I don't understand. Could you give please be more specific about what code the classes should contain. |
I don't have a detail implementation because above class is just an idea. |
If I have a time, I will impelemet this class as a prototype. |
Is there a reason for why msgpack-d doesn't provide packing and unpacking through one common class/struct member? Boost.Units and cerealed does just that.
The text was updated successfully, but these errors were encountered: