3 ms·
Some more bad parts related to protobuf: - While nearly all fields are forced to be optional/nullable, lists and maps can only be empty, not null. - No generi
by zigzag312 2y ago
Some more bad parts related to protobuf:
- While nearly all fields are forced to be optional/nullable, lists and maps can only be empty, not null.
- No generics (leads to more repetition in some cases).
- Custom existing types are not supported. WKT thus require hardcoded codegen (this is a mistake IMO). It limits flexibility or requires much more manual code writing. For example, if I have codebase that uses Instant type (instead of DateTime from standard library) to represent UTC time, there is no build-in way to automate this mapping, even though it could equally well map to the same over-the-wire format as DateTime (which has a hardcoded support). If that kind of extensions would be supported, even specific cases like mapping a collection of timestamps to double delta encoded byte array over-the-wire could be supported. This wouldn't require any changes to the underlying over-the-wire format (just more flexible codegen).