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


   > I love this and I want this everywhere :)
   
   I sort of assumed you would go there, as I was working on #8246 too. So in 
short we would create the R6 object in C++ and don't have to manipulate the 
external pointers in R ? I can see the appeal, but I need to work out some 
logistics. 
   
   We would retain the same signatures ? e.g. 
   
   ```cpp
   // [[arrow::export]]
   std::shared_ptr<arrow::DataType> Int8__initialize() { return arrow::int8(); }
   ``` 
   
   presently before this goes to R, this is wrapped in the external pointer, so 
we have a `cpp11::external_pointer<std::shared_ptr<arrow::DataType>>`, then in 
the R side it gets wrapped into a (subclass of) `DataType`, but I suppose that 
we could have that the `std::shared_ptr<arrow::DataType>`  is directly wrapped 
to the correct R6 instance or NULL, this is essentially moving the weird 
`..dispatch` method down C++ layer.  
   
   
   
   


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