Let me try to clarify with two more motivating examples:
FunctionParameters::FunctionParameters(ParameterNode* firstParameter, unsigned
unsigned i = 0;
for (ParameterNode* parameter = firstParameter; parameter; parameter =
auto pattern = parameter->pattern();
patterns()[i++] = pattern;
If I had to describe this algorithm in English, I’d say, “Collect and retain
all the [auto] from the list of parsed parameters.” I think that explanation
would be stronger if “[auto]” were a concrete noun.
Does anybody prefer auto in this context? If so, why?
auto children = elementChildren(*dummySpanAncestor);
for (auto child = children.begin(), end = children.end(); child != end;
I don’t understand why we’re &*’ing here. That’s a surprising idiom I haven’t
seen before, which I would expect to be a no-op. My first question when reading
this is, “What is the type of ‘child’, such that I would need to &* it?”.
Is this "&*child” obvious to everyone else?
webkit-dev mailing list