3 ms·
It's a bit buried in the announcement, but this is also using a new version of protobuf [0] (3.0) which fixes a number of long-standing complaints about the for
by necubi 12y ago
It's a bit buried in the announcement, but this is also using a new version of protobuf [0] (3.0) which fixes a number of long-standing complaints about the format:
* No more required fields
* Now supports maps (a huge pain point)
* A canonical json encoding
* Wider official language support
[0] https://github.com/google/protobuf/releases https://github.com/google/protobuf/releases
- cespare 12y agoThe changes around defaults and field presence are a great improvement for Go integration (and according to the release notes, also Android Java and Objective C). proto2 integration in Go is fairly unpleasant and involves getters and lots of pointers everywhere (see proto.Int, proto.String).
- justinsb 12y agoPersonally, I'm very disappointed that we've lost immutability, along with support for nullable fields (e.g. Protobuf3 now assumes that 0 == null).
- ejona86 12y agoImmutability is still there. You get to choose whether you want it or not. For when you actually want a nullable field, I think the idea is that it is easy to have a wrapper message (just like boxing in languages). Such wrappers could even be made standard and provided by protobuf.
- haberman 12y ago> Such wrappers could even be made standard and provided by protobuf. They will be: https://github.com/google/protobuf/issues/159#issuecomment-76240356 https://github.com/google/protobuf/issues/159#issuecomment-7...