News for hackers. Stuff that matters.
Re:The Protobuf Language Specification by joshuamorton on Tuesday September 13, 2022 @03:07AM (#32821447)
This is true for proto3, but not for proto2 (except for repeated fields, which are always non-null but can contain 0 items).

Proto2 has `HasFoo` methods, which distinguish between empty (unset/null) and set explicitly to zero fields.

I don't like that proto3 made this choice, I think it was wrong, but there was some rationale behind it beyond just "elegance".

Re:The Protobuf Language Specification by somenameforme on Tuesday September 13, 2022 @03:21AM (#32821519)
Can you elaborate on the reasons for the decision? I've always been quite curious on the reasoning there.