[Development] Proposal: Deprecate QVector in Qt 6

Ville Voutilainen ville.voutilainen at gmail.com
Thu Apr 23 11:30:32 CEST 2020


On Thu, 23 Apr 2020 at 12:25, Philippe <philwave at gmail.com> wrote:
>
> Almost all the time I second your positions, but not this time ;)
>
> QList is historically a cause of ambiguity, and Qt6 is the chance to get rid of that.

Indeed. QList causes confusion for the uninitiated that are aware of
the differences between std::vector and std::list
(as in Why Do These People Use Lists Everywhere? Why don't they use
Vectors?). Now we have papered over
the problem, but the name remains problematic, because QList is not a
list. In Qt5, QList is sometimes a list,
sometimes a vector, but in Qt6 it's never a list.

Switching the QVector implementation over to a type called QList and
aliasing QVector to that with the intent
of getting rid of the QVector name seems exactly backwards to me. I
would think the better approach would
be to keep dev as it is, and deprecate and eventually remove QList.


More information about the Development mailing list