You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/12/16 21:25:08 UTC

[GitHub] [arrow] jonkeane commented on pull request #11904: ARROW-15010: [R] Create a function registry for our NSE funcs

jonkeane commented on pull request #11904:
URL: https://github.com/apache/arrow/pull/11904#issuecomment-996205361


   > > Why is attaching a package name useful?
   > 
   > I think two things...it means we can evaluate stringr::str_detect() without changing much of our code (just implement a binding for ::), and it makes it easier for us or for a user to query which packages are supported and functions are implemented (so they can avoid the "not implemented, pulling data into R" message).
   
   Yeah, an additional benefit is that it makes it slightly more explicit what we intend when we bind to a specific function. I don't know of any overlaps that we have right now (e.g. where dplyr has one function with the name `foo` and lubridate also has a function name `foo`), but looking back and trying to piece together the intention would involve at least a `git blame` (and maybe a Jira search too). Though in fairness, moving all the functions for each package to their own file pretty effectively does this as well.
   
   I do think we will want namespacing with `::` to be resolved sooner rather than later (to be totally honest, I'm quite surprised we haven't seen more Jiras about it! I've reviewed _a lot_ of code in other places and have seen a number of styles that include either always using `::`, or using it liberally to avoid confusion/mistakes. But then again, maybe folks are using `stringr::str_detect()` getting the error message and thinking it's not implemented and thinking that means it's not implemented at all so pulling data into R.)
   
   > > Why is "omitting translations if a package isn't installed" valuable?
   > ...probably not at all (in fact, probably negatively valuable). Maybe one way to resolve a name conflict?
   
   Yeah, part of me things this might be neat (you get the namespace you have installed!) it sounds nice and clean (it follows R's namespacing, nothign new to learn!), but I think ultimately / functionally it's negatively valuable like you say.
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org