I'm really missing the has_foo() functions on primitive elements. Was the decision to drop it from proto3 based on a survey of code on github, or just on an anecdotal type sentiment that "nobody's using it"?
Here's my anecdote, for the record: I've started switching from Proto2 to Proto3. I'm converting an application with a Java server and several clients in Java and C#. One is .NET CF 3.5, which has no support beyond proto2. The application sends a lot of complex messages back and forth, several of which have currency values. There is a big difference in the business logic between a message with a currency value of "not set" and "$0". The only alternatives I'm seeing to support this protocol with proto3 are to either (a) change each currency amount into a submessage, to (b) pair each primitive with a boolean "isSet" flag, or (c) back out and stick with proto2. I'm leaning towards (c), the others seem like more work to implement, and more annoying to maintain. Anyhow, I understand that the optional / has_foo() functionality would add a lot of complexity to the tool for several platforms, but would really simplify the user code, and just generally strikes me as being a critical functionality for a large family of messaging protocols. -- 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 http://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.
