3 ms·
I wonder why text protobuf is not widely used for config. There is a formal description of the structure and the configuration structure can be statically check
by vander_elst 3y ago
I wonder why text protobuf is not widely used for config. There is a formal description of the structure and the configuration structure can be statically checked.
- skybrian 3y agoMaybe because protobufs are specified in a language that’s different from everything else and needs its own parser and codegen? Also, there’s often more of an impedance mismatch with the basic datatypes of scripting languages. For example, people using protobufs will often specify int64 by default, when you don’t actually need 64 bits but need more than 32. JSON support is often in a language’s standard library, or close, and its ambiguity around what numbers you can actually use can be seen as a worse-is-better approach. (There are similar tradeoffs with not specifying a max length of a string. It’s awkward, nit-picky, and error-prone to pick a maximum, but there are practical reasons you don’t want to allow unlimited lengths in a UI.)