[ 
https://issues.apache.org/jira/browse/ARROW-3776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16750569#comment-16750569
 ] 

Paul Kernfeld commented on ARROW-3776:
--------------------------------------

I'm interested in working on this, although there could be a lot of downstream 
effects. A good example of a tricky function is 
arrow::array::PrimitiveArray::value, which appears to be used in a couple dozen 
places. A few possible strategies are:
 # Add in bounds checking so that we don't need to deal with unsafe at all.
 # Propagate the unsafes up through the code.
 # Maintain a safe and unsafe version of each function that is currently unsafe.

Personally I'm a fan of #1 because I think that reducing unsafe code will help 
developers and users avoid mistakes (I [accidentally 
wrote|https://github.com/apache/arrow/pull/3448] a nondeterministic unit test 
earlier this week). However, I'm new to the project so I'm happy to do what 
others think is best.

> [Rust] Mark methods that do not perform bounds checking as unsafe
> -----------------------------------------------------------------
>
>                 Key: ARROW-3776
>                 URL: https://issues.apache.org/jira/browse/ARROW-3776
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: Rust
>            Reporter: Paddy Horan
>            Priority: Minor
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to