4 ms·
> Protocol Buffers implement default zero values (https://developers.google.com/protocol-buffers/docs/proto3#d https://developers.google.com/protocol-buffers/do
by vitus 6y ago
> Protocol Buffers implement default zero values (https://developers.google.com/protocol-buffers/docs/proto3#d https://developers.google.com/protocol-buffers/docs/proto3#d...) and there's no way of discerning whether something is "false" or "unset", the empty-string or unset, etc.
This was one of the significant changes from proto2 to proto3.
This was also met with much opposition internally, and recently changed as of v3.12 (released last year).
https://github.com/protocolbuffers/protobuf/blob/master/docs/field_presence.md https://github.com/protocolbuffers/protobuf/blob/master/docs...
https://github.com/protocolbuffers/protobuf/releases/tag/v3.12.0 https://github.com/protocolbuffers/protobuf/releases/tag/v3....
- strictfp 6y agoOur project got bitten by this hard. I was under the impression that they did this to enable memcpy/memmove into structs, which didn't feel completely motivated if you ask me.