3 ms·
> Except that you don't have a copy of a file format in your code. Except you do in many cases - there are many serialization systems out there where you descr
by int_19h 8y ago
> Except that you don't have a copy of a file format in your code.
Except you do in many cases - there are many serialization systems out there where you describe your structures as types, and they generate the serializers for you. Just look at protobuf as one example. Is a protobuf declaration an API? If not, how is it different from any other API that declares a bunch of structs?
- treis 8y agoI haven't used protobuf so I might be mistaken here, but it's not necessary to use the same variable name. In other words, I can use date_of_birth and you can use birthdate so long as we both agree that the first item in the message is the date a person was born. So you can reverse engineer a protobuf message without creating a direct copy.
- monocasa 8y agoAdding schema metadata to protobuf messages is a pretty common pattern.