felipecrv commented on PR #35422:
URL: https://github.com/apache/arrow/pull/35422#issuecomment-1541254986

   > This PR is ok but I'm not sure std::vector::at is "discouraged". Can you 
provide a reference to that claim?
   
   @pitrou C++ lore.
   
   `at()` is forbidden in exception-free codebases which Arrow mostly is: 
`Status` and `Result` instead of `throw` everywhere.
   
   We return a bad `Status` when we bounds-check and try to avoid 
bounds-checking when we can prove that access is safe. That's why I believe 
it's fair to say the use of `at` is discouraged — Arrow's bounds-checks are 
explicit, non-superfluous and lead to bad `Status` instead of an exception 
being thrown.


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