Dylan Justice wrote:
> 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"?
Hi, Dylan:
As far as I can tell, protobuf design decisions are made internally at
Google, Inc., with little to no consultation with users on the public
'protobuf' group on Google Groups, or the 'google/protobuf' project on
GitHub.
This extends even to code development -- if you look at the Git commit
logs, you'll see commits like "Down-integrate from internal code base"
or "down-integrate internal changes" from Google employees, sometimes
adding thousands of lines of code with no actual commit messages
describing the changes. "Down-integrate" appears to be jargon for
taking commit history from an internal Google source repository and
squashing it all into a single commit, and then applying that commit to
the public source repository on GitHub.
The lack of so-called "hazzers" in protobuf3 has come up repeatedly on
the protobuf Google Groups forum but it would appear that this design
decision is set in stone and the Google, Inc. folks have no desire to
revisit it:
"Yes, proto3 design is finalized."
(
https://groups.google.com/d/msg/protobuf/ZRpcfmeGK6s/Ur6iSkPz1K8J)
Apparently you're supposed to rev your schema and change your
application logic in order to migrate from proto2 to proto3, if you were
using a feature in proto2 that was dropped in proto3. However, Google
doesn't actually recommend that proto2 users migrate to proto3:
We recommend that new Protocol Buffers users use proto3. However, we
do not generally recommend that existing users migrate from proto2
from proto3 due to API incompatibility, and we will continue to
support proto2 for a long time.
(From the protobuf 3 pre-release release notes.)
It's unclear what "long time" means (months? years?) or whether there
will be any notice before proto2 support is dropped from the official
open source Google 'protobuf' code base.
(I'm one of the maintainers of the independent 'protobuf-c' project,
which currently only supports the proto2 language. We've had a few
inquiries about proto3 support, but no one has actually volunteered to
write any code for that yet, and I suspect if we ever do implement
proto3 support we'll probably fork a separate 'protobuf3-c' project with
separate SONAMEs, command-line utilities, etc. and leave the folks happy
with proto2 in peace.)
--
Robert Edmonds