Arguing against using protobuffers
Though I dislike the hyperbolic tone and personal attacks, the author isn&#x27;t entirely wrong. There are many design choices in Protocol Buffers that seem directly related to the scale and complexity at which Google operates, and which sacrifice safety, clarity and language integration.<p>The utter awkwardness of Protobuf-generated code is particularly problematic. I&#x27;ve had pretty good results with the TypeScript code generator, but the Go generator is just egregiously bad. There&#x27;s no way to write a client or server that uses the Protobuf structs directly as first-class data types without ending up looking like a ball of spaghetti, at least not if you venture into the realm of oneofs, timestamps or the &quot;well known types&quot; set of types.<p>I think we&#x27;re at a juncture where we really desperately need a better, <i>unified</i> way to express schemas and pass type-safe data over the network that flows through these schemas. I&#x27;m currently working on a project that involves both gRPC (which uses Protobuf), GraphQL and JSON Schema, with the backends written in Go, and the frontend in TypeScript, and the overlap between all of these is ridiculous. TypeScript is a fresh breath of air that mostly solves the brittleness of JavaScript&#x27;s type system, and it&#x27;s absolutely crucial to extend this type-safety all the way to the backend.<p>The challenge is that no language is the same, and a common schema format ends up targeting a lowest-common denominator. For example, GraphQL errs (in my opinion, wrongly) on the side of simplicity and doesn&#x27;t support maps, so now you have a whole layer that needs to either custom types (JSON as an escape hatch, basically) or emulate maps using arrays of pairs, neither of which is ideal.