[Development] Use of Standard Library containers in Qt source code

André Somers andre at familiesomers.nl
Mon Jul 4 10:14:58 CEST 2016

Op 04/07/2016 om 10:03 schreef Philippe:
>>> Actually, I disagree with that. As someone who has come to appreciate
>>> STL after growing up in the Qt world,
> Exact opposite here: I learned STL from its early days, and could never
> become at ease with its namings... and I started to breath with Qt
> containers :)
I'm not saying the namings are good, and I still find snake_case ugly. I 
dislike the use of abreviations, and yet, isEmpty() is way clearer than 
empty(). But the principles are very sound, especially the use of named 
algorithms over raw loops. Note that Qt has basicaly abandoned it's own 
algorithm collection for the stl one. That's mostly a Good Thing IMHO, 
though having your own collection of algorithms building on top of stl 
good practice I think. STL is by no means complete; you're encouraged to 
extend it. Defining a well-named free function to bridge the gap where 
it improves things is one way of enhancing both: you enhance STL by 
making it more readable to use, and you enhance Qt by embracing 
well-tested algorithms and containers.


More information about the Development mailing list