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

feature: unify the variable naming style #18

Closed
hustjieke opened this issue Jun 17, 2022 · 1 comment
Closed

feature: unify the variable naming style #18

hustjieke opened this issue Jun 17, 2022 · 1 comment
Labels
A-enhancement New feature or request A-feature feature with good idea

Comments

@hustjieke
Copy link
Collaborator

Is your feature request related to a problem? Please describe.

The names of variables (including function parameters) and data members are all lowercase, with underscores between words. Data members of classes (but not structs) additionally have trailing underscores. For instance: a_local_variable, a_struct_data_member, a_class_data_member_.

Describe the solution you'd like

For example:

std::string table_name;  // OK - lowercase with underscore.
std::string tableName;   // Bad - mixed case.
class TableInfo {
  ...
 private:
  std::string table_name_;  // OK - underscore at end.
  static Pool<TableInfo>* pool_;  // OK.
};

...
...

Describe alternatives you've considered

Additional context

For more details:
https://google.github.io/styleguide/cppguide.html#Variable_Names

@RingsC
Copy link
Contributor

RingsC commented Aug 17, 2022

This issue classsified as clean code task, just as #11 does. Therefore, we close this, and reopen if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-enhancement New feature or request A-feature feature with good idea
Projects
None yet
Development

No branches or pull requests

2 participants