▲ | aintnolove a day ago | ||||||||||||||||||||||||||||||||||
I know these problems are easily avoidable... but I'm finally starting to see the appeal of protocol buffers. Just to have the assurance that, regardless of programming language, you're guaranteed a consistent ser/de experience. | |||||||||||||||||||||||||||||||||||
▲ | m3047 2 hours ago | parent | next [-] | ||||||||||||||||||||||||||||||||||
> you're guaranteed a consistent ser/de experience Are there that many implementations of protobuf? How many just wrap the C lib and proto compiler? Consistency can be caused by an underlying monoculture, although that's turtles all the way down because protobuf is not YAML is not JSON, etc. Off in the weeds already, and all because I implemented a pure Python deserializer / dissector simply because there wasn't one. | |||||||||||||||||||||||||||||||||||
▲ | chubot a day ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||
It would nice if it were true :-) But it’s not, for reasons that have more to do with the languages themselves, than parsing e.g. C++ numbers are different than Java numbers are different than Python numbers are different than JavaScript numbers ditto for strings | |||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||
▲ | nottorp 11 hours ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||
But since the article isn't really about parser bugs, I don't think using a different data format will save you from most of the problems described there. | |||||||||||||||||||||||||||||||||||
▲ | liampulles a day ago | parent | prev [-] | ||||||||||||||||||||||||||||||||||
I think you can get similar benefits here from writing an RPC style JSON API into an OpenAPI spec and generating structs and route handlers from that. That's what I do for most of my Go projects anyway. |