[webkit-dev] When to use "auto"? (I usually consider it harmful)
akling at apple.com
Fri Jan 3 11:47:53 PST 2014
On Jan 3, 2014, at 8:28 PM, Geoffrey Garen <ggaren at apple.com> wrote:
>> However I also feel the "harm" here is debatable enough that people working on/reviewing the code should make decisions instead of there being a project level dictate. It is a new thing, the appropriate usage hasn't yet settled and people should be allowed to experiment.
> The experiment has been going on for some time now. We have over 1000 unique uses of “auto” in the codebase. I think it’s time to clarify and collect what we’ve learned.
> One reason I’m eager to produce a guideline is the patches I’ve seen Andreas writing. A whole new kind of pointer in one of the most error-prone pointer areas of our codebase (as measured by security exploits) deserves a clear guideline for readability and understandability.
I agree that RenderPtr<T> should be used explicitly instead of auto at this time. I’ll adjust the code.
More information about the webkit-dev