[Development] RFF: nullptr rules

Jocelyn Turcotte jturcotte at woboq.com
Thu Dec 10 18:42:05 CET 2015


> On 09 Dec 2015, at 23:29, Thiago Macieira <thiago.macieira at intel.com> wrote:
> 
> I'd like to propose this:
> a) no massive replacement or clang-modernize, for the reasons Richard pointed 
> out
> b) which means existing zeroes continue in sources and private headers
> c) which means no -Werror=zero-as-nullptr outside of headersclean
> 
> New code should use nullptr where it improves readability.
> 
> Changes to existing code can update to use nullptr.
> 
> But I don't think we should mandate use of nullptr everywhere. Where it's 
> unambiguous, it doesn't add value.

(I’m not sure what is the official protocol to know when we’ve reached a consensus unless we vote somehow, so:)
+1

I personally don't think that the consistency gain is worth the cost that’d we’d pay in history conciseness if we would change 0 —> nullptr everywhere.

IMO yes, we should be encouraged to use nullptr through the coding convention, but it’s also difficult to convince a whole community to accept being required to use a new toy before everybody had some time to play a bit with it, and like it. So doing this progressively and relying on author+reviewer common sense also seems to me like a good compromise.

Cheers,
Jocelyn


More information about the Development mailing list