<div dir="ltr">Not necessarily. It really depends on which type Qt decides to use in place of what is now returned as a QList.<div>As far as wrapper is concerned, it doesn't even need to be a singlular type if the interface matches since it will be a template anyway.</div><div><br></div><div><br></div><div>P.S. I am not really involved with Qt development so I am obviously missing a lot of context. I just saw that this wasn't even mentioned throughout this thread or the previous one and finally decided to comment.</div><div>I just, personally, see the problems I already mentioned above about incorrect code perception significant enough that QVector solution feels wrong.</div><div>Users will see, for example, codebases with "QList.something.prepend" and assume things. Completely incorrect things. And debugging older codebases is already hard as it is, even when things actually mean what you assume they do.</div><div>The current solution that seems to be heading to Qt6 (qvector alias) will, imho, in the long run, produce a lot of confusion. Not when switching from 5 to 6, but when trying to debug/finetune the code.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 24, 2017 at 4:24 PM, Konstantin Tokarev <span dir="ltr"><<a href="mailto:annulen@yandex.ru" target="_blank">annulen@yandex.ru</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
24.05.2017, 16:19, "NIkolai Marchenko" <<a href="mailto:enmarantispam@gmail.com">enmarantispam@gmail.com</a>>:<br>
<span class="">> I was talking about the solution that assumes making a QArrayList type and deprecating QList entirely,<br>
> not the one that aliases QList to QVector which I, personally, don't like, since it will produce a lot of the code perception problems and incorrect perfomance assumptions.<br>
<br>
</span>So, do you propose to replace QList with QArrayList in existing APIs? That would be a serious pessimization for small types.<br>
<div class="HOEnZb"><div class="h5"><br>
> Not to mention people will still widely use QList as it's "easier to type "(don't laugh) and "looks like a default container by simplicity of its name"<br>
> (again, don't laugh, I am just outlining potential problems with new users)<br>
><br>
> On Wed, May 24, 2017 at 4:12 PM, Konstantin Tokarev <<a href="mailto:annulen@yandex.ru">annulen@yandex.ru</a>> wrote:<br>
><br>
>> 24.05.2017, 15:49, "NIkolai Marchenko" <<a href="mailto:enmarantispam@gmail.com">enmarantispam@gmail.com</a>>:<br>
>>> A semi-sane idea that I think no one has suggested yet:<br>
>>><br>
>>> What if, starting from Qt6, QList becomes a wrapper for QArrayList with a contructor from this type?<br>
>>> After all making existing code slightly _slower_ because of the wrapping overhead is way less problematic than breaking it outright.<br>
>>> It will nudge the users of QLists that need to be fast to switch but will leave users of "default no brainer container" happy as they likely wouldn't even notice.<br>
>><br>
>> If existing Qt APIs switch from QList to QVector in Qt 6, such change will make it hard to support both Qt 5 and Qt 6 in the same code base.<br>
>><br>
>>><br>
>>> On Tue, May 23, 2017 at 5:27 PM, Thiago Macieira <<a href="mailto:thiago.macieira@intel.com">thiago.macieira@intel.com</a>> wrote:<br>
>>>> On Tuesday, 23 May 2017 04:56:52 PDT Olivier Goffart wrote:<br>
>>>>> In my opinion for Qt6, we should make prepend, takeFirst amortized O(1) in<br>
>>>>> QVector.<br>
>>>><br>
>>>> That is not very difficult once we move the begin pointer out of the d pointer<br>
>>>> and into the main QVector class. We need to add an interface to QArrayData to<br>
>>>> shrink and expand the buffer without relocating it. With that, we practically<br>
>>>> hide the allocated capacity information from QVector too.<br>
>>>><br>
>>>> --<br>
>>>> Thiago Macieira - thiago.macieira (AT) <a href="http://intel.com" rel="noreferrer" target="_blank">intel.com</a><br>
>>>>   Software Architect - Intel Open Source Technology Center<br>
>>>><br>
>>>> ______________________________<wbr>_________________<br>
>>>> Development mailing list<br>
>>>> <a href="mailto:Development@qt-project.org">Development@qt-project.org</a><br>
>>>> <a href="http://lists.qt-project.org/mailman/listinfo/development" rel="noreferrer" target="_blank">http://lists.qt-project.org/<wbr>mailman/listinfo/development</a><br>
>>> ,<br>
>>><br>
>>> ______________________________<wbr>_________________<br>
>>> Development mailing list<br>
>>> <a href="mailto:Development@qt-project.org">Development@qt-project.org</a><br>
>>> <a href="http://lists.qt-project.org/mailman/listinfo/development" rel="noreferrer" target="_blank">http://lists.qt-project.org/<wbr>mailman/listinfo/development</a><br>
>><br>
>> --<br>
>> Regards,<br>
>> Konstantin<br>
<br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">-- <br>
Regards,<br>
Konstantin<br>
</font></span></blockquote></div><br></div>