On Friday, 7 de October de 2011 15:49:59 Ruurd Pels wrote: > > On Oct. 7, 2011, 2:35 p.m., Ruurd Pels wrote: > > > Revert the whitespace changes with git. Other than that I dislike > > > multiple exit points even in trivially short functions. It really does > > > not hurt to create a local variable holding the result of the function > > > and then return that as the result of a function. Another pet-peeve is > > > negative tests, for example ... if ( !xxx->isEmpty() ) ... and would > > > prefer conditions always yielding true, for example if ( xxx->isEmpty() > > > == false) ) instead.> > > Christoph Feck wrote: > > If you read the "!isEmpty" as "is not Empty", the first version sounds > > clearer, natural, and easier to understand than the second version. > Free after my fellow countryman Edsger Dijkstra: Negate considered harmful. > It is easy to overlook the !-operator and negative tests require an extra > mental step to be able to follow the logic. And yes it is a pet peeve.
That may be, but there's nothing in the style guide asking for this change. I'd say it's optional if the author wants to do them. -- Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org Software Architect - Intel Open Source Technology Center PGP/GPG: 0x6EF45358; fingerprint: E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
signature.asc
Description: This is a digitally signed message part.