[Development] Use of Standard Library containers in Qt source code
steveire at gmail.com
Sat Jul 2 12:40:53 CEST 2016
Stephen Kelly wrote:
> Thiago Macieira wrote:
>> More to the point, Qt developers don't have to know the Standard Library.
>> *I* don't and I don't have time or interest in learning it.
> There is a big division within the C++ community. There is the Qt way and
> the non-Qt way, and they don't overlap.
This is the real point of my email. There is division along a Qt and non-Qt
boundary on things like this.
It is analogous to different sides voting in a referendum: Each side is
completely perplexed with the other and can't understand their thinking,
thinks the other side is 'stupid' or otherwise low-quality, and doesn't want
to waste time understanding it.
For people who learn programming and learn C++ by learning Qt (myself
included), the Qt implementation seems familiar with all the raw loops if
you have never encountered the alternative.
However, everyone else is excluded by it. When my colleagues find long
functions, lots of nested if()s and for()s, ++foo somewhere in while loops,
they find it much harder to reason about the code. Now I do too.
So, by sticking to lots of raw loops, you're actually actively excluding
other parts of the C++ community from participating. I don't have numbers to
qualify it, but there seems to me to be a much larger community following
modern C++ practices than following Qt practices on questions like this.
I encourage you and everyone else to dive into it.
More information about the Development