covid-sim
covid-sim copied to clipboard
Rename some parameters in Param.h
Rename multiple parameters in Param.h
.
Currently using snake_case
for struct Param
in Param.h
because there is evidence of multiple naming conventions for different parameters: PascalCase
, camelCase
, PascalCase_WithUnderscore
, etc., can be changed if there is a official code style guide.
Refactor Scope
This PR is strictly restricted to parameter naming changes, and does not intend to refactor struct Param
into smaller struct
s and enum
s. Future PRs are planned to split the work into multiple stages for easier review and testing. This PR should not change any type signatures and thus should not perform any semantic/behavioural changes.
This PR also attempts to minimize reformatting to minimize the diffs. A proper reformatting tool such as clang-format
should be used as a follow-up PR to do an overall reformat due to changes in line length resulting from parameter name changes.
TODOs
- Some parameter are not yet renamed, because:
- I could not derive their intended purpose and units of measurement from existing documentation or from call sites / usage locations (some of them don't have documentation that I can find from
docs/
or from other issues / PRs). - Still debating on a good name for the parameter.
- I could not derive their intended purpose and units of measurement from existing documentation or from call sites / usage locations (some of them don't have documentation that I can find from
Refactor Opportunities for Follow-up PRs
-
KernelType
really should be anenum
. It seems thatKernelType
also determines which function should be used, so a compile-time function lookup table might be useful here.
I only renamed a subset of the parameters, more renaming can happen in follow-up PRs.
From a previous conversation with @matt-gretton-dann
- member variables are snake_case_ with trailing underscore
- methods are snake_case()
- classes / structs are CamelCase