Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Haskell conventional haskell style for protobuf field names and protobuf enum values #5

Open
bitc opened this issue Jul 28, 2015 · 1 comment

Comments

@bitc
Copy link

bitc commented Jul 28, 2015

message SongServerRequest {
  required string song_name = 1;
}

enum Foo {
  FIRST_VALUE = 1;
  SECOND_VALUE = 2;
}

In the generated Haskell, the record name for the field song_name should be songName, and the generated constructors for the Foo enum should be FirstValue and SecondValue.

This is to be consistent with the conventional style that is used in Haskell.

Note that a similar conversion is done in the official Java protocol buffers library. See https://developers.google.com/protocol-buffers/docs/style

@k-bx
Copy link
Owner

k-bx commented Jul 29, 2015

I like the proposal, looks good. One thing to note is that when implementing this, person needs to provide a flag --no-camelcase to hprotoc that would keep old behavior for people who have large code-bases and no motivation for the change

@stiell stiell mentioned this issue Dec 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants