[Development] RFC: more liberal 'auto' rules?

Blasche Alexander alexander.blasche at theqtcompany.com
Fri Dec 4 10:45:06 CET 2015

> -----Original Message-----
> From: Development [mailto:development-bounces at qt-project.org] On Behalf
> Of Thiago Macieira
> Sent: Friday, 4 December 2015 9:14
> To: development at qt-project.org
> Subject: Re: [Development] RFC: more liberal 'auto' rules?
> On Friday 04 December 2015 08:49:14 Marc Mutz wrote:
> > > Qt has enough market share by itself that we can choose our own direction
> > > and still be relevant. We are allowed to disagree with what others do.
> >
> > Yes, but only if we know *better*.
> >
> > I very much doubt that more than very few people in Qt development have the
> > knowledge to objectively overrule the accepted C++ authorities.
> That's why we use the mailing list and discuss the issue. Our collective minds
> together are quite powerful.

First of all I'd like to point out that I agree with Thiago and Randall. In fact, I added the auto policy to the Qt coding conventions.

This policy has been in place for much longer in Qt Creator (and therefore the Qt version  just an adoption). I had my fair share of arguing over what is better or worse readability wise. At the end of the day it's subjective which makes argumentation about right or wrong harder. For me the point is that if I have to look up a function signature to figure out what type is behind the return values auto type then that's bad. An always auto policy is just asking for such situations. 

> You're calling for "opt-in by default" approach, while I am calling for an
> "opt-out by default" approach.


More information about the Development mailing list