Truly optional scalar types in protobuf3 (with Go examples)
In contrast to protobuf2 there is no way in protobuf3 to mark some fields as optional
and some other fields as required
. Instead, any field might be omitted leading this field to be set to its default zero-value. I believe there were many good reasons for such a design decision. However, while this behavior might be superior to the proto2's explicit distinction between required
and optional
fields, it also has some unfortunate implications.
