[
https://issues.apache.org/jira/browse/ARROW-14960?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17454381#comment-17454381
]
Micah Kornfield commented on ARROW-14960:
-----------------------------------------
I think the size of Google's code base meant that there were "a lot" of
optional parameters that got passed by pointer and this caused real production
bugs. I think the incidence in Arrow has been a lot lower (as I think most of
the output parameters are not optional?).
The change inside of Google was made a little while ago (many months, maybe
even 1+ years), and I'm still not fully accustomed to it. I'm happy to
document this as a deviation from the Google style guide. I don't think this
particular change is a good use of people's time to try to change/update
existing code. As others have noted I think the old rule based on readability
at call-sites still has value.
I'd be fine adopting it as a standard for new APIs but don't have a strong
preference to do so.
> [C++] Google style guide allows mutable references now, what do?
> ----------------------------------------------------------------
>
> Key: ARROW-14960
> URL: https://issues.apache.org/jira/browse/ARROW-14960
> Project: Apache Arrow
> Issue Type: Bug
> Components: C++
> Reporter: Ben Kietzman
> Priority: Minor
>
> As of
> https://github.com/google/styleguide/commit/7a7a2f510efe7d7fc5ea8fbed549ddb31fac8f3e
> the Google Style Guide no longer forbids use of mutable references for
> output arguments, and actually encourages using them when the output argument
> is not optional.
> This puts arrow c++ style out of sync since we've continued to police toward
> usage of pointers for output arguments. We could:
> - keep the ban and note this as a deviation from google style in
> [development.rst|https://github.com/bkietz/arrow/blob/392af8aa999f940ab8fd61684820b2c6d89f7871/docs/source/developers/cpp/development.rst#L74-L75]
> - open JIRA(s) for deprecating/replacing pointer-output APIs where applicable
--
This message was sent by Atlassian Jira
(v8.20.1#820001)