romainfrancois commented on pull request #8256:
URL: https://github.com/apache/arrow/pull/8256#issuecomment-719453483


   > A few things I noticed, mostly rebase cleanup.
   >
   > It kinda feels like we've just moved the shared_ptr() business down a 
level since we still have to explicitly wrap and declare types for the output, 
though that is an improvement. I had envisioned something, either as as_sexp 
methods or as some custom wrapping in codegen.R, that would handle the mapping 
from the return signature (e.g. std::shared_ptr<arrow::Table>) to R6 class name 
(Table). Maybe that was wishful thinking.
   
   Let me try to push this further. 
   
   Now all the functions return an `R6`, which for now is just an alias to 
`SEXP` but may become some other thing, and it's our job to make the right R6 
based on the shared pointer we mean to wrap. 
   
   This is indeed just moving the needle and pain down on level. 
   
   What I can try to do is that `R6` be a class that: 
     - can be converted to `SEXP`, i.e. it has a `operator SEXP()` 
     - can be constructed from the various types, e.g. we'd have many 
constructors like `R6(const std::shared_ptr<T>&)` for all the `T` we handle,  
and some of these (e.g. `R6(const std::shared_ptr<arrow::Array>&)` do some 
dispatch (what `r6_Array()` does now). 
   
   
   


----------------------------------------------------------------
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.

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


Reply via email to