On 2015-12-24 19:16, Kevin Kofler wrote:
> Matthew Woehlke wrote:
>>   auto result = QString{a + b};
> 
> IMHO, that's just a complicated and ugly way to write:
>   QString result = a + b;
> 
> There is no way the variable can be uninitialized if you initialize it right 
> there in the declaration.

That's nice, but what about when you forget to initialize something? If
you (almost) always use auto, the compiler will squawk. The benefit
comes from *consistency*.

Anyway, I'm not trying to argue passionately that Qt should follow AAA.
I'm just saying that it's incorrect to state that you have to deviate
from AAA because it might give you the wrong type. (And, as Marc notes,
AAA, used correctly, actually *better* documents code in such case.)

-- 
Matthew

_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to