Open timotheecour opened 8 years ago
I'm a little confused about the use case - part of the point of protocol buffers is that you don't have multiple copies of the data classes to maintain. Is this something you run into regularly?
it's very common: proto's are by design limited (no methods although that's a mooter point in D thanks to UFCS, no pointers / self referencing etc), so are often used mostly for serialization/deserialization to disk and RPC's. So in languages like C++ you have to write the conversion from native data structure to proto. But in D it can be done automatically thanks to CT reflection. That's what msgpack and orange and other serialization packages do.
would be nice to support conversions, when possible:
eg: