[Development] Upgrading the sources to C++11 keywords (Q_NULLPTR, etc.)

Matthew Woehlke mw_triad at users.sourceforge.net
Tue Feb 10 23:47:38 CET 2015


On 2015-02-09 15:05, Marc Mutz wrote:
> On Monday 09 February 2015 20:10:44 André Pönitz wrote:
>> On Mon, Feb 09, 2015 at 09:36:46AM +0100, Marc Mutz wrote:
>>> I find Q_NULLPTR *beautiful* (bautyful is deeper than pretty), because I
>>> know at some point we will be able to just s/Q_NULLPTR/nullptr/. That's
>>> not possible with 0 (not even with NULL (could be C code)), so I don't
>>> see the point in continuing to use 0.
>>
>> At some time you will be able to ran clang-modernize with the
>> Use-Nullptr transformation or something similar.
>>
>> [...]
>> Diversity is good in biology. Less so in code.
> 
> By the same token, we should stop fixing code formatting "mistakes" in passing, 
> since we could just run clang-format.

As a related anecdote, I actually have code bases (okay, personal code
bases, but still) that run format checking *as a pre-commit hook*. It's
quite nice to have a code base that is completely style-consistent (as
much so anyway as tools can validate) :-).

(I suspect there are Python code bases for which this is also true.)

I've also worked on non-private code bases that have been occasionally
audited with code formatting tools.

-- 
Matthew




More information about the Development mailing list