Closed paulrougieux closed 2 years ago
For example the elements of this vector are inconsistent, the first is in snake case, while the others have a capital letter:
https://github.com/bluefoxr/COINr/blob/49faac222d7c86db84b6ae7356a61a0d98b27ed2/R/examples.R#L32
@paulrougieux I actually agree with you on this. However I have to think of the users of the package - I recently did a major update which aligned a lot of the function syntax, although it could still be improved as you point out. The problem is that renaming functions and function arguments causes a lot of problems in terms of backward compatibility and continuity for users and I would strongly prefer not to do that again (at least not in the short term).
Overall I'd say that the gain from further improving the syntax is not enough to justify the pain it would inflict on users. So I would request to keep names as they are for now and potentially make gradual changes that have minimal impact (e.g. renaming when a function is deprecated for another reason, etc, and keeping new functions to strict style guidelines). What do you think?
"the gain from further improving the syntax is not enough to justify the pain it would inflict on users."
Backward compatibility for the users is a good argument. You can close this issue for now.
For backward compatibility, you could rename function arguments without affecting the user for example with a function definition of the type:
plot_corr(coin, dset = "Normalised", icodes = list("Physical"), levels = 1, iCodes=icodes, Levels=levels)
A strategy suggested in this SO answer to the question How to deprecate an argument?
The Changes from COINr v1.0.0 specifies that:
Why not keep all function names in snake case?
The tidyverse style guide specifies that:
You could for example start the build functions with
build_
?Looking at an example from the visualisation vignette:
The function arguments would be simpler to remember if they were in snake case, i.e
icodes
andlevels
.Similarly the elements of a coin could be in lowercase as well :
Renaming functions and arguments to snake case is a matter of taste and not essential for the JOSS review.