-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
Hi,
This is more of a question than an issue.
I see that GPB Messages are essentially structured records. But, the grpc generates erlang files (from proto files) which uses maps. Is there a way we can generate record format for messages?
The main advantage I can see is,
- I can include the generated header file in other Erlang modules and we have a handy way of generating messages.
- Also, if
protobufinitializes some members of a message to default values, records could have been initialized to those default values as well, thereby caller need not worry filling in those fields. If it were maps, the caller needs to populate every possible member of message or else, I could get a runtime exception when invoking a service which is using that Message. - I could take the help of an editor to populate record fields for auto-completing record names or field names. Thereby code is less prone to typos.
If I can generate a record with existing code, can you please point me to an example on how to do that?
Thanks
-Vasu
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels