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

Add explanation of underscore-separated units in variable names [ci skip] #6470

Open
wants to merge 2 commits into
base: dev-2.x
Choose a base branch
from

Conversation

abyrd
Copy link
Member

@abyrd abyrd commented Feb 19, 2025

As discussed in a recent meeting, this adds a short explanation of why some variables have underscore-separated units as part of their names, defying standard camelCase.

It seems a little strange to update an already existing decision record, but this is a very minor point and probably less likely to be seen if it were split out into a separate style document.

@abyrd abyrd requested a review from a team as a code owner February 19, 2025 08:50
Copy link

codecov bot commented Feb 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.18%. Comparing base (c23f3a7) to head (a5cf6b3).
Report is 219 commits behind head on dev-2.x.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@              Coverage Diff              @@
##             dev-2.x    #6470      +/-   ##
=============================================
+ Coverage      70.10%   70.18%   +0.07%     
- Complexity     18209    18305      +96     
=============================================
  Files           2073     2081       +8     
  Lines          77318    77184     -134     
  Branches        7820     7828       +8     
=============================================
- Hits           54205    54168      -37     
+ Misses         20344    20248      -96     
+ Partials        2769     2768       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@leonardehrenfried leonardehrenfried changed the title Add explanation of underscore-separated units in variable names Add explanation of underscore-separated units in variable names [ci skip] Feb 20, 2025
Copy link
Member

@optionsome optionsome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps a more fitting place would be NamingConventions.md.

@abyrd
Copy link
Member Author

abyrd commented Feb 24, 2025

Perhaps a more fitting place would be NamingConventions.md.

Yes, I considered that too. There was no section there on variables, but I could add one.

@abyrd abyrd requested a review from optionsome March 5, 2025 14:55
@@ -62,6 +62,12 @@ them.
| `setStop(Stop stop)` | Set a mutable Stop reference. Avoid if not part of natural lifecycle. Use `initStop(...)` if possible. |
| `getStop() : Stop` | Old style accessor. Use the shorter form `stop() : Stop`. |


## Variables
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Variables
## Units in variable names

Does "variable names" means "field, parameter and variable names"? That is my understanding of this and if we agree on that then I am OK with just using "variable names" - it is easier to read.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants