impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Apple (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] Avoid std::function when possible.
Date Mon, 28 Nov 2016 22:43:33 GMT
Jim Apple has posted comments on this change.

Change subject: Avoid std::function when possible.
......................................................................


Patch Set 1:

> > I don't think we should never use it, but I think it is overkill
 > for this use case
 > 
 > The alternative implementation is more complex, in terms of lines
 > of code and also wrt the need for a specialised construction
 > pattern.
 > 
 > Here, std::function serves the role of simplifying the
 > implementation and the interface (what do I pass in? Oh, it's a
 > function). Do you find the templated version more readable?

I do not find it more readable, but I find it to be readable enough; I think the readability
delta is a good price to pay to avoid boxing up a lambda.

-- 
To view, visit http://gerrit.cloudera.org:8080/5230
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If9dc034c2e094ea7f87f78d8d9101a71d8d2e295
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Jim Apple <jbapple-impala@apache.org>
Gerrit-Reviewer: Henry Robinson <henry@cloudera.com>
Gerrit-Reviewer: Jim Apple <jbapple-impala@apache.org>
Gerrit-HasComments: No

Mime
View raw message