[Development] RFF: nullptr rules

Thiago Macieira thiago.macieira at intel.com
Thu Dec 10 19:35:42 CET 2015


On Thursday 10 December 2015 16:24:02 Sergio Martins wrote:
> > But I don't think we should mandate use of nullptr everywhere. Where it's
> > unambiguous, it doesn't add value.
> 
> bool foo = 0;
> 
> This is unambiguous, just like your "const char *ptr = 0" example, so "=
> false" wouldn't add value ?

Strictly and technically speaking, that is true.

Current coding practice is that we don't do it. I am willing to accept that 
using nullptr improves readability and people should use it if they want to. 
But I don't want -1s going on because someone's muscle memory used a 0 instead 
of nullptr.

More importantly, I don't want a massive code change, because it will not 
catch everything and it will cause unnecessary churn and merge conflicts. 
Clang-modernize requires inspecting all platforms and that will not happen.

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




More information about the Development mailing list