scovich commented on PR #7807: URL: https://github.com/apache/arrow-rs/pull/7807#issuecomment-3024082063
> * The `Index` trait _requires_ its implementation to return references. This works ok for `VariantMetadata`, which returns `&'m str`, but `VariantList` and `VariantObject` need to return wrapper objects by value and so cannot `impl Index`. Instead, their infallible `get` type methods return `Option` instead of `Result`, which isn't really an improvement to user experience. @alamb -- what are your thoughts here? I'm not convinced a `get` that can panic and yet still returns `Option` is really better than a `try_get` that cannot panic and returns `Result`? Either way you have to handle the "error" case, so there's no usability or readability improvement to offset the panic risk? -- 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