[Development] Use of Standard Library containers in Qt source code
thiago.macieira at intel.com
Fri Jul 1 22:05:45 CEST 2016
On sexta-feira, 1 de julho de 2016 22:52:24 PDT Konstantin Tokarev wrote:
> > I had to look up the definition of readHeaders in the review and note that
> > it was a std::deque, not a Qt container.
> STL was standardized 18 years ago, I think it should be enough to get used
> to empty().
Qt API conventions predate the Standard Library standardisation. Qt's style
exists because -- quite by definition -- Qt developers think their style is
better. Moreover, Qt is recognised for having a nice, easy-to-learn API,
whereas the C++ Standard Library meets quite often the exact opposite reaction
(yes, anecdotal evidence).
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. You will always see me
write a for-loop to fill something rather than use std::fill.
Qt users don't have to learn it either. If they read the Qt source code, they
should understand it. They might do that because they were debugging their
application and stepped into Qt to find out what's happening.
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Development