Hacker News new | ask | show | jobs
by jsnell 722 days ago
Yes, proto3 as released was garbage, but they later made it possible to get most proto2 behaviors via configuration.

Re: your question, for proto3 an field that's declared as "optional" will allow distinguishing between set to default vs. not set, while non-"optional" fields don't.

1 comments

Ah, ok! Yeah I think we've been working with an older version of protobuf for a while where that wasn't an option.
Yet still in 2024, supporting optional is off by default for some languages in protoc...