-
Notifications
You must be signed in to change notification settings - Fork 3
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 camelCaseFunctionNames
in generated files
#2
Comments
I like the idea and would favor using lower camel case names in generated zig code. However, all of the other implementations I looked at used title camel case including go, cpp and python if i remember correctly. So I chose to follow them because its a little easier to compare generated code. I'm not sure why this is a thing. I can see why the go impl does this as it follows the go style guide. But the cpp and python impls aren't following their style guides. Maybe we could add a build or config option for changing the function casing? I would be glad to accept a PR for this. But I'd like to default to title case for now, at least until a day when this project is more trusted (known to work well) and comparing generated code shouldn't be necessary. |
Hey @travisstaloch , would you accept a PR refactoring Serious issues
generates a non-existent call to pub fn UnpackTo(rcv: Field, t: *FieldT, __pack_opts: fb.common.PackOptions) !void {
if (rcv.Type_()) |_tab| {
t.type = try TypeT.Unpack(rcv.Type_Type(), _tab, __pack_opts);
}
}
Style issues
pub fn rcv(rcv: Field) bool {
...
} This can of course be solved by renaming the parameter to Sorry to hijack this issue, let me know if there's a better way to contact you. I'm happy to make all these changes. |
Sorry so long. Looked at this earler today and forgot to respond. These all sound like legitimate problems to me and I would gladly accpt a PR. 👍 I've created #3 with the text from above. Lets discuss there |
Instead of
TitleCaseFunctionNames
follow https://ziglang.org/documentation/master/#Names and usecamelCaseFunctionNames
like the language and standard library.The text was updated successfully, but these errors were encountered: