Replies: 1 comment 1 reply
-
It's fair to say it's grown organically, so no ;) But lower camel case for variables/attributes and methods/functions, and upper camel case for class and struct names, is simple and closest to the existing codebase. I don't particularly like Hungarian-style I could see a case for retaining initial capitals for those C++ methods that back Lua methods, but maybe they'd be better named |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there a style I ought to follow? When making smaller changes, I've just adopted whatever the local style seemed to be. I have plans for some larger PRs where I'll be writing more net-new code, and I'd like to not stand out if possible.
The README mentions hard tabs and "braces as shown", but is silent about other things like naming conventions for types, methods, class methods, local variables, class members, etc.
Looking around for examples to follow, it seems like there's a mix of
snake_case
,camelCase
andInterCaps
-- even within the same source file and class of things.My default would probably be to follow something close to Google's rules: https://google.github.io/styleguide/cppguide.html#Naming (rationale: any style is fine, just need one that enumerates rules for common scenarios)
Beta Was this translation helpful? Give feedback.
All reactions