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

Improve consistency of naming internal functions #6072

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

teunbrand
Copy link
Collaborator

@teunbrand teunbrand commented Sep 3, 2024

This PR aims to fix #6024.

Briefly, it enforces some consistency on the various check_*() and validate_*() functions in ggplot2's unexported functions.

Check functions:

  • Check input verbatim
  • Their purpose is to throw conditions when input is unexpected
  • Return nothing (that is, invisible(NULL))

Validator functions:

  • Can take different variants of input
  • Their purpose is to converge output from input
  • Return a single type of output

In addition, a smaller category are functions that take possibly deprecated values and restore it to valid values. I've named these update_*() functions here, but that might be confusing and perhaps we could choose a better name.

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.

Naming of internal helper functions
1 participant