There are more than just the rationale of "most users don't use the field presence logic much". If I understand it correctly, Google wants to make proto3 available to other languages (e.g. Ruby) where there is no concept of default values, meanwhile 'has_foo()' relies on the default value, which means everything is optional now and these "hazzers" logics have to go away.
On Wednesday, March 25, 2015 at 9:55:44 AM UTC-4, V.B. wrote: > > Open question to everyone. I'm curious. > In all of your use-cases with protobuf, how often do you find yourself > using has_foo() (a.k.a. "hazzers") for primitive fields? We use them > almost everywhere because, for example, it is a very useful way of > error-checking requests on the server sent from our client code on mobile > devices. Maybe we're just outliers. > > Google's stated reason for getting rid of presence logic is below (bolding > by me): > >> *It's believed* that most users don't use the field presence logic much >> and for those who need this feature adding a bool field is an easy >> workaround. >> > > ... It would definitely *not* be an easy workaround for us given how much > we rely on presence logic. Are we in the minority? > > > -- 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.
