We've been using proto3 at my workplace for a while now, and noticed some 
inconsistency in the merge behavior between the C++ and C# implementations 
when it comes to oneof fields.
It seems that in the C++ implementation, if both messages being merged have 
the same oneof case set then the field is merged properly (otherwise the 
incoming message's field replaces the existing one).
On the other hand, in the C# implementation the incoming message's field 
always simply replaces the existing one, even if it's the same field (as 
opposed to proper merging if it's the same field, as in the C++ 
implementation).
It looks like this is true for the merge functions both in the generated 
code and in the protobuf libraries.

Is there any reason for the different behaviors? Is there any change 
planned to make the two implementations' behaviors more consistent?
I think the C++ behavior probably makes a little more sense, but either way 
- shouldn't this behavior be consistent between the different 
implementations?

-- 
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to