[webkit-dev] Guideline for nullptr

Darin Adler darin at apple.com
Mon Jan 6 11:55:36 PST 2014


I suggest we use nullptr, rather than of 0 or NULL, for all pointer nulls in WebKit C++ sources. I don’t see any advantage to using 0 or NULL over nullptr, and nullptr has multiple advantages. Three obvious ones: Compile time error if accidentally passed to something expecting an integer, can be distinguished from an integer in function overloading, can tell it’s a pointer.

Any objections?

— Darin

PS: Maybe even instead of nil in WebKit Objective-C++ code?


More information about the webkit-dev mailing list