Hey!
New to Protobuf here, I was wondering if there are any means to enforce two 
messages structures having similar members.
Let's say that for example I'd like to have two packing options:
1. As compact and dynamic as possible for network and storage operations
2. Sparse for efficient rule matching 

So basically I'd like to have a `to` and `from` functions generated between 
these messages and also enforcement if any of them changes as to not break 
compatibility.

I've created a simple protobuf code (is it even considered code?) for my 
case which you can find here https://pastebin.com/BhGgTKkE

The end goal is that in my example I'd like to have a 
`CompactEntry.toSparseEntry()` function 

I understand that this might be a hard to implement feature as it requires 
different message to know each other. Also , I know that protobuf doesn't 
support inheritance. I was just wondering if anyone else tackled a similar 
issue and if there's a best practice around it.

Thanks a lot!


-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/b98a8c7e-add1-44ac-85a6-1015adfc2f60n%40googlegroups.com.

Reply via email to