-
Notifications
You must be signed in to change notification settings - Fork 0
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
align utility function prefixes #132
Comments
I don't have strong views on this, but since we are getting pretty semantic here, here's a few thoughts:
|
I think the logic is that |
@cjyetman totally understood! It's used a lot in Rust too with the same functionality. I was just putting on my incredibly nit-picky hat, and commenting on the fact that based exclusively on the name it's not immediately/ totally unambiguous, but of course with additional context/ experience it is more clear 😊 but anyway, I leave it to you and @jacobvjk to decide, I'm more than happy with any of the approaches |
Seems related to #54 |
yes, conceptually related, but targeted at different sets of thing that could be aligned |
We have a variety of
validate_*()
,abort_*()
, andstop_if_not_*()
functions here (I take significant responsibility for that, though the misalignment was mostly created when importing the functions from pacta.multi.loanbook.analysis and pacta.multi.loanbook.plot).Additionally, through my experience building pacta.data.validation, I came to the conclusion of using
assert_*()
andis_*()
as prefixes for such functions, for the purpose of keeping the prefixes reasonably short while also clearly identifying which functions throw an error versus those that returnTRUE
orFALSE
.@jacobvjk @jdhoffa I'd like to decide which style we prefer here and implement that universally in this package.
stop_if_not_*()
function names to affirmativeassert_*()
names #227cli::cli_abort()
#228cli::cli_warn()
#229The text was updated successfully, but these errors were encountered: