-
Notifications
You must be signed in to change notification settings - Fork 109
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
All local variables, function parameters, struct fields should be camelCase. #215
Comments
I don't see a reason to include underscores in the |
imo no underscore in unknown fields, again this is already in the style guide, I just haven't gone through and fixed it all yet |
Hi, snakehead (Python programmer) here. snake_case is beautiful and any attempts to eliminate it will be met with Protean Arceus. |
I use underscore in BattleContext to differentiate it from unknowns in BattleSystem since it's much easier to control and replace that way without conflicts lol |
That sounds like you need a better way of distinguishing the fields. |
No like I would cntrl + f and replace the unkowns constantly and it was much easier to do so when I wasn't accidently replacing the wrong |
yes so do something like unk_z_A40 or something |
I personally prefer snake_case, no underscores in unknown variables/members |
I prefer camelCase in general, though I feel it would be useful to have unknown fields to stand out with a different style specifically to make people document them. |
On the record:
|
This issue has had no activity for 60 days and will be marked stale. If there is no further activity, it will be closed in 30 days. |
This issue has had no activity for 60 days and will be marked stale. If there is no further activity, it will be closed in 30 days. |
Useful grep to find instances:
grep -Pwr --include="*.c" --include="*.h" "[a-z_]+_[a-z_]+[,;\)]" --exclude-dir="tools" --exclude-dir="sub" --exclude-dir="lib" --exclude-dir=".github" --exclude-dir="files"
Do not apply this logic to Nintendo Libraries.
Local variable example
Good:
Bad:
Function parameter example
Good:
Bad:
Struct field example
Good:
Bad:
Exception: unknown fields. There is no consensus whether unk fields should have an underscore between the
unk
and the offset value (and probably other stuff)The text was updated successfully, but these errors were encountered: