ggplot2 icon indicating copy to clipboard operation
ggplot2 copied to clipboard

Naming of internal helper functions

Open teunbrand opened this issue 1 year ago • 0 comments

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.

teunbrand avatar Aug 02 '24 15:08 teunbrand