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

Function name prefix #13

Open
Huh opened this issue Oct 9, 2018 · 6 comments
Open

Function name prefix #13

Huh opened this issue Oct 9, 2018 · 6 comments
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@Huh
Copy link
Owner

Huh commented Oct 9, 2018

I will propose that we prefix every function name with cllr. This will make it easy to find functions in RStudio using the suggestions, so a function might be called cllr_foo or cllr_fetch_csv or whatever, but it will always start with cllr. Other suggestions?

@Huh Huh added help wanted Extra attention is needed question Further information is requested labels Oct 9, 2018
@Huh Huh added this to the Read data functionality milestone Oct 9, 2018
@Huh Huh closed this as completed Feb 7, 2019
@rgzn
Copy link

rgzn commented Feb 26, 2019

Not sure this is a good idea. The standard way to solve this issue is the use of namespaces instead of making all function names longer.

All functions in the collar library should be in the collar namespace so should be used as follows:

collar::foo
collar::fetch_csv

@Huh
Copy link
Owner Author

Huh commented Feb 26, 2019 via email

@Huh
Copy link
Owner Author

Huh commented Feb 26, 2019

I don't have a strong opinion about this and another person brought up the same idea of dropping the object_verb naming convention. We should revisit the conversation

@Huh Huh reopened this Feb 26, 2019
@Huh
Copy link
Owner Author

Huh commented May 9, 2019

Have revisited several times now and looks like we are working towards families of functions.

All of the fetch_* functions retrieve data for example. I think this is a nice hybrid solution, other thoughts?

@kissmygritts
Copy link

@Huh just chiming in to agree with @rgzn. I tend to type collar::fetch_csv when I use packages and want text completion. This is kind of attempting to add namespacing when it already exists. I do like your design philosophy of families of function.

@Huh
Copy link
Owner Author

Huh commented May 20, 2020

Thanks for the feedback @kissmygritts

I think I agree with you. I would like to reorganize the package a bit and this could be part of that effort.

ericnewkirk added a commit that referenced this issue Apr 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants