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

Thiago Macieira thiago.macieira at intel.com
Mon Jul 4 22:08:23 CEST 2016

On segunda-feira, 4 de julho de 2016 13:54:45 PDT Matthew Woehlke wrote:
> Consider... if I ask you what relation the letter 'A' has to the
> alphabet, is it the letter *at the front*, or is it the *first* letter?
> I bet you, and most (native, certainly) English speakers said it's the
> *first* letter. STL's word choices are... a bit like writing code in
> King James' English.

Hence "push" and "pop" for a stack, "front" and "back" for queues, but not the 
2x2 combination of those on a random-access container...

 > I do however feel that Qt's consistent use of verbs for actions and
> non-verbs for properties (i.e. empty vs. isEmpty/is_empty) is far superior.

Not just verbs for actions, that's verbs in the imperative. We also use verbs, 
but in the past participle, for signals ("changed", "happened", "written", 
except where the English language falls short, like "read / read / read" - 
that's why "readyRead" instead of "bytesRead").

Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

More information about the Development mailing list