tustvold commented on issue #6737:
URL: https://github.com/apache/arrow-rs/issues/6737#issuecomment-2549690061

   
https://doc.rust-lang.org/book/ch09-03-to-panic-or-not-to-panic.html#guidelines-for-error-handling
   
   I think is relevant here, panics are a perfectly valid way to handle 
unexpected or illegal system states, especially when this would have safety 
implications.
   
   Errors should be used where the situation is expected, e.g. due to user 
input.
   
   I would be pretty lukewarm on a load of PRs randomly replacing assertions 
with errors, this just makes code harder to read and blurs what situations are 
expected. 
   
   However, PRs that change panics reachable from public APIs into errors are 
welcome


-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to