Naming #206
Replies: 14 comments 47 replies
-
Summary of Naming Schemes from Different Style Guides Here's a summary of the different naming schemes for the three style guides that we're most interested in adopting. If there are any others that we're interested in please let me know and I'll add them! In brief, Google is the only guide of these three that has a dedicated naming section, the other guides just adopt Google and have (mostly minor) noted exceptions scattered throughout them.
Chromium C++
Mozilla C++
|
Beta Was this translation helpful? Give feedback.
-
Votes for Google C++ |
Beta Was this translation helpful? Give feedback.
-
Votes for Chromium C++ |
Beta Was this translation helpful? Give feedback.
-
Votes for Mozilla C++ |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Something I don't understand at this point in the discussion. How rigid will adherence to an adopted style guide be? Considering variable names and capitalization, for example. Let's say you want to define the log of the temperature and the log of the density in a single function. I think naming those variables log_d and log_T is sensible and easy to understand. But that doesn't seem like it would be an option with any of the listed style guides. I don't want to lose the easy-to-interpret physics of the code, in order to adhere to a specific style. |
Beta Was this translation helpful? Give feedback.
-
Global Variables should have a suffix or prefix that indicates they're a globalIt looks like the consensus is a |
Beta Was this translation helpful? Give feedback.
-
Public and Private member variablesProposal:
|
Beta Was this translation helpful? Give feedback.
-
Prefix for Device Variables and FunctionsProposal:
|
Beta Was this translation helpful? Give feedback.
-
Kernel Naming ConventionSpecial naming for kernels is not currently enforceable by |
Beta Was this translation helpful? Give feedback.
-
Names For Specific Kinds of VariablesI.e. density, momentum, etc. Note that |
Beta Was this translation helpful? Give feedback.
-
FilenamesGoogle allows |
Beta Was this translation helpful? Give feedback.
-
Meeting Dec 16 notes Loud_Snake_Case for functions |
Beta Was this translation helpful? Give feedback.
-
See the Cholla Wiki for a summary of this discussion: https://github.com/cholla-hydro/cholla/wiki/Making-a-Pull-Request |
Beta Was this translation helpful? Give feedback.
-
This is where we'll discuss our preferences for a unified naming scheme in Cholla.
Per our rules on the other style wars thread:
Voting and discussing:
👍 = "I like this"
😕 = "I don't like this"
👀 = "I have seen this and don't care"
👎 = "I veto this"
To keep voting organized, make each choice a Comment on the Discussion. The top level Comments should all be voting options or a neutral introduction to the topic. Debates should all happen in Replies: general replies under the neutral introduction, option-specific pros/cons under their vote Comment.
Thus the hierarchy is as follows: Discussions (for each issue), Comments (for each option), Replies (for each pro/con)
Beta Was this translation helpful? Give feedback.
All reactions