alamb commented on PR #6039:
URL: https://github.com/apache/arrow-rs/pull/6039#issuecomment-2226852353

   > The goal of above helper functions is to not break too many code and make 
it easier for user to migrate to the new api.
   > Basically, it asks user to explicitly call `to_byte_slice()` or explicitly 
pass an array that is obvious to user that it needs a copy.
   
   I think this is done in https://github.com/apache/arrow-rs/pull/6043
   
   Maybe you could add some doc comments to `Buffer` on 
https://github.com/apache/arrow-rs/pull/6043  with this context @XiangpengHao  
(specifically, add the rationale of why the APIs are structured the way they 
are -- "to make it clearer when copying is occuring"). 
   
   What code actually *does* can always be found by reading it, but *why* it 
was written that way is often not as easy to figure out. Thus I think comments 
focused on the *why* can be very helpful


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