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


   > 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).
   
   > I see the value of providing an extension point to users/other package 
developers.
   >
   > I don't understand what you mean by allowing "us to change how we evaluate 
translated expressions without changing many function assignments".
   
   I think I was thinking here of doing something like changing the name or 
type of `nse_funcs` that would generate a fairly large diff. Not mission 
critical, just more separation between defining a binding and evaluating an 
expression.
   
   > Why is it a good idea to move this to package load time? Some might see 
that as a negative if it is significant in run time. It also doesn't seem like 
it is necessary to move the assignment to load time, is it? You could have the 
registry function but still assign at build time.
   
   I haven't been able to notice any change in load time, which I think is just 
environment assignment time for 50 or so SEXPs that are already in memory. I 
got the idea from the current Arrow code, which registers bindings for the 
compute functions at package load. Another option is to not load them at all 
until the first call to a dplyr function.
   
   > We can split up translations into multiple files without this change.
   
   Happy to rewrite this PR as that, too, as I think it's the biggest 
improvement. I like not having to think about collate order and I don't mind 
the extra two spaces of indent, but happy to do something else if that's not 
the best way forward.
   
   > Why is "the possibility of defining different translations for different 
versions of packages" valuable?
   
   The bindings try very hard to replicate the exact functionality of the R 
function they're wrapping...one way to allow a path forward for that when 
functions change signature is multiple translations (although probably easier 
to do that at function evaluation time).
   
   > 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?


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to