[Development] Use of Standard Library containers in Qt source code
marc.mutz at kdab.com
Sat Jul 2 07:46:28 CEST 2016
On Friday 01 July 2016 20:36:56 Thiago Macieira wrote:
> The use of the Standard Library member "empty" is highly confusing at
> first sight because it does not follow the Qt naming guidelines. It's
> even more confusing because the next line has "isEmpty". When I read this
> code, I had to wonder if that "empty" was a verb in the imperative,
> meaning the author was trying to remove all elements from the container.
Don't make this about the STL. Your arguments trivally extend to any third-
So what you are actually proposing is to not use any third-party code in Qt
unless it is wrapped in a Qtsy API first.
This is a bit over the top, isn't it? We want to allow our users to stay in
the cozy Qt bubble for their own projects. As implementers of that bubble, we
have no right to stay in it ourselves if doing so would be to the detriment of
our users. And even creating an API wrapper is to the detriment of our users,
because it requires resources that are then no longer available to fix real
If this is straw poll, I'm voting for Option 5. C++ programmers (those that
wish to implement a C++ library) should be familiar with the STL.
Marc Mutz <marc.mutz at kdab.com> | Senior Software Engineer
KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
KDAB - Qt, C++ and OpenGL Experts
More information about the Development