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

Change function names to include namespace #10

Open
salvafern opened this issue Jun 27, 2023 · 0 comments
Open

Change function names to include namespace #10

salvafern opened this issue Jun 27, 2023 · 0 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@salvafern
Copy link
Member

salvafern commented Jun 27, 2023

There are only two hard things in computer science: cache invalidation and naming things.

Following the famous quote of Phil Karlton I would like to argue about changing the names of the functions. Main intention is to keep it as sync as possible with the pyhton extension pyo_oracle. So we got:

R

biooracler::list_layers()
biooracler::download_dataset()

Python

pyo_oracle.list_layers()
pyo_oracle.download_dataset()

Which in principle would be fine. However, as you may know these are also function names used in sdmpredictors, and by design the R functions will overlap as there is no need to call the namespace in the functions after loading a package.

library(sdmpredictors)
library(biooracler)

# ??? Which one?
list_layers()

One solution

A way to surpass this problem is to add a prefix to the functions that makes them unique. This is widely used within the R community. E.g.

bo_list_layers()

This means that the names of the methods of both the R and python extensions will be slightly different. However, I believe it will make biooracler easier to use and less confusing.

On the other hand, sdmpredictors and biooracler should eventually become one single package, as they have a very similar purpose and they differ mainly in the back-end.

But I would like to discuss this publicly and you may have better arguments. Looking forward to see what you think!

@salvafern salvafern added enhancement New feature or request question Further information is requested labels Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant