[Development] What qtbase looks like with extensive use of auto
Stephen Kelly
steveire at gmail.com
Mon Mar 21 22:46:44 CET 2016
Matthew Woehlke wrote:
> On 2016-03-19 14:02, Stephen Kelly wrote:
>> In case you missed it, I wrote an auto-modernizer
>>
>> https://steveire.wordpress.com/2016/03/19/aaargh
>
> Thanks for sharing. I admiringly adore all the abounding (and artistic)
> alliteration adorning the article. (Sorry, couldn't think how to avoid
> "the" in that ;-). And "I" *is* alliterative, darn it :-), at least in
> pronunciation.)
Thanks :). And
> admiringly adore all abounding (and artistic)
> alliteration adorning articles
??
> Also, this looks like an interesting tool that I may wish to use myself...
>
> I do wonder why your tool doesn't convert this...?
>
> // old
> QStringList middleStrings = sl.mid(1, 500);
>
> // new
> auto middleStrings = QStringList{sl.mid(1, 500)};
I leave all decisions like that to humans.
The conversion to QStringList may be 'wrong', so the tool leaves it behind
so that it stands out.
That is, a human might decide this is right for the code in question:
auto middleStrings = sl.mid(1, 500);
Thanks,
Steve.
More information about the Development
mailing list