News for hackers. Stuff that matters.
Re:The Protobuf Language Specification by IshKebab on Monday September 12, 2022 @03:57PM (#32815993)
A good reference. I don't think it was really needed in the same way that e.g. a JSON or C++ spec was, since the language is so simple there's not much room for ambiguity. Definitely nice to have anyway.
Re:The Protobuf Language Specification by jhumphries131 on Monday September 12, 2022 @04:10PM (#32816198)
It is a simple language, being just an IDL (no expressions, no logic, no state, no memory model, etc).

However, you might be surprised about the room for ambiguity. For example, there are several mistakes in the grammars on the official developer site. And there is no place on the developer site that, for example, clearly explains how option names are formulated and interpreted. Even the way that relative references are resolved is not thoroughly described; it is probably the most complicated part of the spec because coherence/consistency wasn't keenly considered when the reference implementation in protoc was devised (https://www.protobuf.com/docs/language-spec#relative-referen...).

So if you wanted to write a tool for the language, one that could correctly parse and understand a source file, without the details in this spec that tool will almost certainly be incorrect and disagree with how protoc parses and understands the same source.

Re:The Protobuf Language Specification by IshKebab on Monday September 12, 2022 @05:12PM (#32817062)
It does make me hope that some protobuf libraries will integrate their own compilers. The official one can be a bit of a pain to install. This will definitely make that easier!