ggplot2
ggplot2 copied to clipboard
Naming of internal helper functions
This dawned on me while preparing #6022, but the naming scheme for several (internal) functions is at times somewhat confusing.
Especially now that we're using the imported check_*() functions from {rlang}, it feels out of place to have ggplot2-native check_*() functions do something else than throwing errors/warnings. For example check_linewidth() returns data.
The inverse is also true, we have functions that are used solely for throwing errors/warnings, but don't have the check_*() prefix. An example of this is validate_element().
I understand these names precede the rlang checks, but it probably won't hurt to make the names more consistent.