[Development] What qtbase looks like with extensive use of auto

Richard Moore rich at kde.org
Mon Mar 21 22:57:25 CET 2016


There are certainly quite a few areas of the qtnetwork patch that I think
make the code significantly easier to read. I don't think I'd apply
everything from it, eg. some of the changes from int to auto just make
things less clear in my eyes, but other parts are a massive win. Thanks for
sharing this, it certainly make me think we should be actively using it.

Cheers

Rich.

On 19 March 2016 at 18:02, Stephen Kelly <steveire at gmail.com> wrote:

> Hi,
>
> In case you missed it, I wrote an auto-modernizer
>
>  https://steveire.wordpress.com/2016/03/19/aaargh
>
> It is not quite AAA, as it doesn't convert
>
>  QString s;
>
> into
>
>  auto s = QString();
>
> I used it to port qtbase to an extensive use of auto:
>
>  https://github.com/steveire/qtbase/commits/aaa
>
> This isn't something I want to push for Qt to apply, but it's something I
> did and you might find the outcome interesting.
>
> If you think Qt should use auto not-at-all, not-a-lot, or almost-always,
> I'm
> sure you'll find lots of reasons in the commits to support your position.
>
> Thanks,
>
> Steve.
>
>
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20160321/d21056d0/attachment.html>


More information about the Development mailing list